How do I create a MongoDB dump of my database?

前端 未结 19 2518
既然无缘
既然无缘 2020-12-22 15:06

What command do I use and run?

19条回答
  •  感动是毒
    2020-12-22 15:42

    There is a utility called : mongodump On the mongo command line you can type :

    >./mongodump
    

    The above will create a dump of all the databases on your localhost. To make dump of a single collection use:

    ./mongodump --db blog --collection posts
    

    Have a look at : mongodump

提交回复
热议问题