首先需要清除原数据库里的内容
然后执行命令:
/home/mongodb/mongodb/bin/mongorestore -h 127.0.0.1:27107 (链接地址) -d testdb (需要恢复的数据库) home/backup/testdb (备份所在目录)
备份文件内容:
首先需要清除原数据库里的内容
然后执行命令:
/home/mongodb/mongodb/bin/mongorestore -h 127.0.0.1:27107 (链接地址) -d testdb (需要恢复的数据库) home/backup/testdb (备份所在目录)
备份文件内容: