[英]mongodump does not create backup files
I need to create a database backup of mongo database (all collections).我需要创建 mongo 数据库(所有集合)的数据库备份。 I went to Command Line Tool page at https://cloud.mongodb.com and copied the command:
我转到https://cloud.mongodb.com的命令行工具页面并复制了命令:
So I run this command in the terminal:所以我在终端中运行这个命令:
mongodump --uri mongodb+srv://LineOf****@lineof****.fmyzn.mongodb.net/LineOf**** --out=testmongo
I enter password, it is accepted, then I do not get any files or errors.我输入密码,它被接受,然后我没有收到任何文件或错误。 Terminal is just ready for the next command.
终端已准备好接收下一个命令。
What do I do wrong?我做错了什么? Thank you!
谢谢!
Is your database name correct?您的数据库名称是否正确? It should show some output if it was actually dumping anything.
如果它实际上正在倾倒任何东西,它应该显示一些 output。
If the name was wrong it might not return anything.如果名称错误,它可能不会返回任何内容。
2022-12-26T15:58:37.043-0700 writing testo.test to backup/testo/testo.bson
2022-12-26T15:58:38.469-0700 [........................] testo.test 0/1 (0.0%)
2022-12-26T15:58:41.055-0700 [########################] testo.test 1/1 (100.0%)
2022-12-26T15:58:41.055-0700 done dumping testo.test (1 document)
For example, for a database named testo
the command should look like:例如,对于名为
testo
的数据库,命令应如下所示:
mongodump --uri mongodb+srv://user@*****.mongodb.net/testo --out=backup
Then, in that case you'd have a folder called backup
with a testo
folder inside it with the backup.然后,在这种情况下,您将拥有一个名为
backup
的文件夹,其中包含一个带有备份的testo
文件夹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.