mongodb 备份还原

 

#mongodb 备份数据库
mongodump -h 192.168.2.230 -d bimtalk_dev --authenticationDatabase admin -u root -p shbcadmin123 -o /usr/local/mongodb_backup/20220319 

#mongodb   还原数据库
mongorestore -h 192.168.2.230 --authenticationDatabase admin -u root -p shbcadmin123 -d bimtalk_dev1 /usr/local/mongodb_backup/20220319/bimtalk_dev 

posted @ 2022-03-19 21:35  学亮  阅读(37)  评论(0编辑  收藏  举报