How do I create a MongoDB dump of my database?

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

What command do I use and run?

19条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-22 16:02

    You can dump your database and restore with bellow command

    mongodb  -d  -o 
    

    for example my database name is tracking i have dump in dump folder

    mongodb  -d tracking -o dump
    

    Restoring dump

    mongorestore -d  
    
    mongorestore -d tracking  dump/tracking
    

提交回复
热议问题