How do I create a MongoDB dump of my database?

前端 未结 19 2387
既然无缘
既然无缘 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 <Your_db_name> -o <path of your folder>
    

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

    mongodb  -d tracking -o dump
    

    Restoring dump

    mongorestore -d <databasename> <dum_path>
    
    mongorestore -d tracking  dump/tracking
    
    0 讨论(0)
提交回复
热议问题