How do I create a MongoDB dump of my database?

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

What command do I use and run?

19条回答
  •  没有蜡笔的小新
    2020-12-22 16:00

    If your database in the local system. Then you type the below command. for Linux terminal

    mongodump -h SERVER_NAME:PORT -d DATABASE_NAME
    

    If database user and password are there then you below code.

    mongodump -h SERVER_NAME:PORT -d DATABASE_NAME -u DATABASE_USER -p PASSWORD
    

    This worked very well in my Linux terminal.

提交回复
热议问题