【发布时间】:2021-08-11 20:06:35
【问题描述】:
我正在尝试将 mongo 从本地迁移到地图集。我做了 mongodump,它正确地创建了 .z 存档。
但是,当我尝试如下恢复时:
mongorestore --uri="mongodb+srv://<user>:<password>@xxxxx.ipmg6.mongodb.net/myDbName" --archive=mongodump_2021-05-22_09-05-44.gz --gzip
我看到了输出
2021-05-23T07:25:01.340+0200 The --db and --collection flags are deprecated for this use-case; please use --nsInclude instead, i.e. with --nsInclude=${DATABASE}.${COLLECTION}
2021-05-23T07:25:01.350+0200 preparing collections to restore from
2021-05-23T07:25:01.360+0200 0 document(s) restored successfully. 0 document(s) failed to restore.
没有错误,但也没有处理任何文件。知道有什么问题吗?我的东西没有来自 mongo 的错误或警告?
【问题讨论】:
-
你的文件有多大?
-
.gz 文件大小为 29KB。
标签: mongodb mongorestore