[英]mongorestore error Failed: EOF when restore DB from dump.gz
I am getting error while importing DB backup using mongorestore command with dump.gz我得到的错误,而使用与dump.gz mongorestore命令导入数据库的备份
Using following command to restore DB使用以下命令恢复数据库
mongorestore --gzip --archive=dump.gz --nsInclude=MyApp
Getting following error得到以下错误
2019-12-04T14:14:40.352+0530 Failed: EOF
2019-12-04T14:14:40.352+0530 0 document(s) restored successfully. 0 document(s) failed to restore.
Any one can please help me with this what wrong with this command任何人都可以帮我解决这个命令有什么问题
Thank you谢谢
--nsInclude="MyApp" syntax is wrong --nsInclude="MyApp" 语法错误
Try for example: Syntax:尝试例如: 语法:
mongorestore --nsInclude=dbName.collectionName
You can also restore a specific collection or collections from the dump/ directory.您还可以从 dump/ 目录恢复特定的一个或多个集合。 For example, the following operation restores a single collection from corresponding data files in the dump/ directory:例如,以下操作从 dump/ 目录中的相应数据文件中恢复单个集合:
mongorestore --nsInclude=test.purchaseorders dump/ mongorestore --nsInclude=test.purchaseorders 转储/
If the dump/ directory does not contain the corresponding data file for the specified namespace, no data will be restored.如果 dump/ 目录不包含指定命名空间的相应数据文件,则不会恢复任何数据。 For example, the following specifies a collection namespace that does not have a corresponding data in the dump/ directory:例如,以下指定一个集合命名空间,在 dump/ 目录中没有相应的数据:
mongorestore --nsInclude=foo.bar dump/ mongorestore --nsInclude=foo.bar 转储/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.