Backup and recovery MongoDB1makesureallprocesswhichiswritingmongodbarestopped. 2dumpdatabasefromGAMONGODB81sudo. mongodump -- hostgamongodb91: 27017 -- usernameGAEditor -- password9AEd! T0r -- outdataBondPrice_backup3compressback
Backup and recovery MongoDB 1 make sure all process which is writing mongodb are stopped. 2 dump database from GAMONGODB81 sudo./mongodump -- host gamongodb91: 27017 -- username GAEditor -- password 9AEd! T0r -- out/data/BondPrice_backup 3 compress back
Back up and restore MongoDB
1> make sure all process which is writing mongodb are stopped.
2> dump database from GAMONGODB81
Sudo./mongodump -- host gamongodb91: 27017 -- username 'gaeditor' -- password '9aed! T0r' -- out/data/BondPrice_backup
3> compress backup folder with tar, 1 hour
Tar-cvf/data/BondPrice_backup.tar/data/Bondprice_backup
4> copy tar file in dallas from B37, 5 hours
Sudo scp msdomain1
Bhuang1 @ gamongodb81:/data/Bondprice_backup.tar
5> Uncompress tar file, 0.5 hour
Tar-xvf/data/Bondprice_backup.tar
6> Drop connections from BondData
Dbo. BondPrice. drop ();
Dbo. IDCPrice. drop ();
Dbo. ContractPrice. drop ();
7> restore database with backup folder, 2 hours
Sudo./mongorestore/data/BondPrice_backup -- host gamongodb61: 27017 -- username 'gaedit' -- password '9aed! T0r'