@echo off title 数据库备份 echo 数据库备份开始 cd /d D:\MongoDB\Server\4.0\bin mongodump -h 127.0.0.1 -d product -u=admin -p=admin -o E:\backupdb\%date:~0,4%-%date:~5,2%-%date:~8,2% echo 数据库备份结束