Mongodb Backup and Restore

 

 

 

 

1)      Cmd path

Find the path in your computer with include mongodump.exe and mongorestore.exe

Mongodb Backup and Restore

 

2)      Backup script

-h host

-d database name

-o output path in your computer

--username –password add it inneed

 

Example:

DEV: mongodump -h 10.10.5.20:27017 -d test -o C:\mongo\bin\111\dockerDev

SIT: mongodump -h ds023520.mlab.com:23520 --username esquel --password pw123456 -d lpd-fabric-development_sit -o C:\mongo\bin\111\sit

Mongodb Backup and Restore

After backup, there will be a backup folder in your output path

Mongodb Backup and Restore

Mongodb Backup and Restore

 

3)      Restore script:

Same as backup script, example:

 

DEV: mongorestore -h 10.10.5.20:27017 -d test C:\mongo\bin\111\dockerDev\test

SIT: mongodump -h ds023520.mlab.com:23520 --username esquel --password pw123456 -d lpd-fabric-development_sit  C:\mongo\bin\111\sit\ lpd-fabric-development_sit

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2021-10-07
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-04
  • 2021-05-21
  • 2021-05-25
  • 2021-11-22
  • 2021-11-30
  • 2021-12-16
  • 2021-06-18
相关资源
相似解决方案