【发布时间】:2022-02-22 18:40:59
【问题描述】:
我目前正在尝试将使用 mongodb:3.4-jessie 制作的 mongodump 恢复为更新的版本,mongodb:4.2.3-bionic强>。
当我尝试执行我的命令时:
sudo docker exec mongo mongorestore —db=mock —gzip /mongorestore/app
它返回给我这个错误:
2020-05-01T00:01:29.405+0000 the --db and --collection args should only be used when restoring from a BSON file. Other uses are deprecated and will not exist in the future; use --nsInclude instead
2020-05-01T00:01:29.406+0000 Failed: mongorestore target '/home/user1/mongorestore/app' invalid: stat /home/user1/mongorestore/app: no such file or directory
2020-05-01T00:01:29.406+0000 0 document(s) restored successfully. 0 document(s) failed to restore.
文件夹app 包含BSON 文件和json.gz。
我无法升级旧的转储,因为它是唯一剩下的东西,我真的想使用新版本的 mongo。
非常感谢!
【问题讨论】:
标签: mongodb nosql mongodump mongorestore