备份 T:\mongodb\bin\mongodump.exe -h 127.0.0.1 -d BRM_Message -u saadmin -p L123 -o "d:\backup\mongobak\%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%" mongorestore -h 127.0.0.1 -d BRM_Message --directoryperdb /backup/mongobak/3/ -u saadmin -p L123 还原:
E:\mongodb\bin>E:\mongodb\bin\mongorestore -h 127.0.0.1 -d BRM_Message --drop -
-directoryperdb "E:\mongodb\back\11231629\BRM_Message"
connected to: 127.0.0.1
http://docs.mongodb.org/v2.2/reference/mongorestore/