mongodump“失败:错误的选择:只能将单个集合转储到标准输出" [英] mongodump "Failed: bad option: can only dump a single collection to stdout"
本文介绍了mongodump“失败:错误的选择:只能将单个集合转储到标准输出"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
mongodump --out "-"
不起作用,它给我以下消息:失败:错误的选择:只能将单个集合转储到stdout". 会发生什么?...
doesn't work, it gives me this message : "Failed: bad option: can only dump a single collection to stdout". What happens ?...
推荐答案
所以例外是不言自明的,如果使用--out-",则只能在stdout上显示单个集合.
so the exception is self-explanatory that if you use --out "-" it can show only single collection on stdout.
所以我想知道你想实现什么?
So i would like to know as to what you want to achieve?
如果您要标准输出特定的收集命令,请执行以下操作:
if you want to stdout a particular collection command is :
mongodump -o - -d <dbname> -c <collection name>
如果要转储整个mongodatabase的理想命令是:
if you want to take dump of whole mongodatabase ideal command is:
mongodump --gzip --archive=db.tar
这篇关于mongodump“失败:错误的选择:只能将单个集合转储到标准输出"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文