使用mongorestore从地图集还原MongoDb存档

问题描述

我从mongodb地图集(在线下载链接)中下载了备份 restore-xxx.tar.gz

我想使用此命令在其他服务器上还原

.\mongorestore.exe -uri mongodb+srv://xxx-xxx.mongodb.net --username xxxx --password 'xxxx' --nsFrom='xxxxx.*' --nsTo='restoreDbTest.*' --gzip --archive='D:\MongoExportData\restore-xxx.tar.gz'

我尝试过解压缩tar的结果也是如此:

.\mongorestore.exe -uri mongodb+srv://xxx-xxx.mongodb.net --username xxxx --password 'xxxx' --nsFrom='xxxxx.*' --nsTo='restoreDbTest.*' --gzip --archive='D:\MongoExportData\unzip-***.gz'

我收到此错误:

2020-10-30T11:41:24.494+0100    Failed: stream or file does not appear to be a mongodump archive
2020-10-30T11:41:24.495+0100    0 document(s) restored successfully. 0 document(s) failed to restore.

您能解释一下为什么我无法使用mongorestore恢复Atlas备份吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)