How do I export/dump mongodb database?

后端 未结 2 409
野趣味
野趣味 2020-12-08 02:41

I tried a mongo export like this:

./mongodump --db local --collection lecturer 

and then I tried:

./mongodump --db  local -         


        
2条回答
  •  庸人自扰
    2020-12-08 03:40

    mongodump is a command-line utility and it's supposed to be run from the system command prompt, not the mongo javascript shell.

    ./mongodump --db local --collection lecturer
    

    if successful, this command will create some files under dump directory in the current dir.

提交回复
热议问题