数据备份 - mongodb数据库如何定时备份?上线的项目,mongodb需要注意什么?
伊谢尔伦
伊谢尔伦 2017-04-25 09:02:39
0
2
776

如题,mongodb数据库如何实现定时备份,目前数据库在阿里云上,为了安全,如何实现每天或者一定时间自动备份到另一个服务器上?
mongodump 如何时间定时自动执行?
已经上线的项目,后期维护需要注意什么??

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(2)
给我你的怀抱

If you want to execute it regularly, just use crontab under Linux.

But I think that in order to improve the availability of online mongoDB, it is most appropriate to use replica sets. When a mongo instance hangs, it automatically switches to the exception one. Also, in certain scenarios, replica sets can improve read performance. Of course, the premise is that you have extra machines.

曾经蜡笔没有小新

mongodump does not seem to have a timing option, but it is possible if the operating system is used. For example, in Linux, you can use the vi editor to edit and execute mongodump -u -p -d -h, and then use the crontab command to start vi regularly to achieve the purpose of scheduled backup.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template