设为首页 加入收藏

TOP

备份和恢复MongoDB
2014-11-24 01:08:20 来源: 作者: 【 】 浏览:5
Tags:备份 恢复 MongoDB
备份和恢复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 /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 'GAEditor' --password '9AEd!t0r'
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇比例函数相关语句 下一篇使用SQLite的感想

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: