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 

Leave a Reply

Your email address will not be published. Required fields are marked *

*