AWS 的 MongoDB 备份策略
如果我在 EC2 实例中运行 mongodb,并且不断地(某种程度上)写入数据,那么最智能、安全且廉价的备份策略是什么。
我担心的是,如果 EC2 实例出现故障,您会丢失写入磁盘的所有数据......
If I have mongodb running in an EC2 instance that is being written to (somewhat) constantly what is the most intelligent, safe, and inexpensive backup strategy.
My concern is that if an EC2 instance goes down you lose any data written to disk...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
老问题,但我认为我可以提供有关真实成功案例的更多细节和信息。
在生产环境中,我有 3 个 Mongodb,其复制集在 3 个 T2.micro 实例中运行,1 个实例是主实例,1 个实例是辅助实例,1 个实例使用持久 EBS 进行延迟(每 4 小时同步一次)(实例后不会删除)重新启动)。
每隔 4.5 小时,我就会启动一个 Lambda 进程,生成延迟实例的 EBS 快照并将其发送到 S3 存储桶。
这工作得很好。
一些可以提供帮助的链接:
Old question but I think that I can contribute with more details and informations about a real success case.
In a production environment I have 3 Mongodb with replicaset running in 3 T2.micro instances, 1 instance is the primary, 1 instance is the secondary and 1 instance is delayed (every 4 hours is synchronized) with persistent EBS (it's not deleted after instance reboot).
Every 4.5 hours I start a Lambda process that makes a EBS snapshot of delayed instance and sends to a S3 bucket.
This is working pretty well.
Some links that can help:
谁能比 10gen(MongoDB 开发人员)更好地回应您。
您可以在下面的网站中看到有关 EC2 实例中 MongoDB 备份的官方文档。 http://docs.mongodb.org/ecosystem/platforms/amazon-ec2/
他们建议使用 EBS 快照。该解决方案允许在几秒钟内使用数据库的“照片”启动实例。
Who better than 10gen (MongoDB developers) to responds you.
You can see in follogin site, official documentation about MongoDB backups in EC2 instances. http://docs.mongodb.org/ecosystem/platforms/amazon-ec2/
They suggest an EBS snapshots. This solution permits start instance in a few of seconds with a "photo" of your database.
我们使用(至少两个)Linux 实例,数据存储在 EBS 和副本集 (http://www.mongodb.org/display/DOCS/Replica+Sets) 上。
We use (at least two) linux instances with the data stored on EBS and replica sets (http://www.mongodb.org/display/DOCS/Replica+Sets).