MongoDB备份还原(Shell)

1、备份

mongodump --host localhost --port 27027 -d test -c patient -o D:\Database\MongoDB3\backup

2、还原

mongorestore --host localhost --port 27027 --drop -d test D:\Database\MongoDB3\backup 

Comments are closed.