mongodb 如何做备份才能支持恢复至任意时间点
天蓬老师
天蓬老师 2017-04-22 08:59:00
0
2
625

我目前用mongodump --oplog来备份数据库, 但是不知道如何恢复到指定时间点
哪怕这个"时间点"是以"天"为单位也好过没有

另外我备份出的文件中有一个oplog.bson, 里面什么内容也没有, 这个正常吗?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
PHPzhong
mongodump --host yourdbhost --port 27017 --db dbname --collection collectionname

-o mongodb --query '{"relativeStamp":{$lt:1389949842}}'

Does the original poster want to back up like this?

伊谢尔伦

It is not a standard database after all. If it follows your request. Maybe it really doesn't meet your requirements.
What we are applying now is actually mongo data only for acceleration.
We have an oracle as the original source.
Daily data query mongo.
When the data of the data oracle changes, this operation will also be synchronized to mongo.
When mongo data is abnormal, we will synchronize the entire database.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!