我应该只坚持使用AWS RDS自动备份或数据库快照吗? [英] Should I stick only to AWS RDS Automated Backup or DB Snapshots?

查看:1327
本文介绍了我应该只坚持使用AWS RDS自动备份或数据库快照吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用适用于MySQL的AWS RDS.关于备份,我了解到Amazon提供了两种类型的备份-自动备份和数据库(DB)快照. 此处说明了区别.但是,我仍然感到困惑:我应该只坚持自动备份还是坚持自动备份和手动备份(数据库快照)?

I am using AWS RDS for MySQL. When it comes to backup, I understand that Amazon provides two types of backup - automated backup and database (DB) snapshot. The difference is explained here. However, I am still confused: should I stick to automated backup only or both automated and manual (db snapshots)?

您觉得家伙如何?自己的设置是什么?我从其他人那里听说,由于数据库实例崩溃时某些不可恢复的数据库,自动备份是不可靠的,因此数据库快照是拯救您的方法.如果我要像自动备份一样做每日数据库快照设置,那我将付出很多.

What do you think guys? What's the setup of your own? I heard from others that automated backup is not reliable due to some unrecoverable database when the DB instance is crashed so the DB snapshots are the way to rescue you. If I am to do daily DB snapshots as similar settings to automated backup, I am gonna pay much bunch of bucks.

希望任何人都可以启发我或建议我进行正确的设置.

Hope anyone could enlighten me or advise me the right set up.

推荐答案

根据个人经验,我建议两者都做.我将自动备份设置为8天,然后还有一个脚本,该脚本每天拍摄一次快照并删除7天之前的快照.原因是因为据我了解,在某些情况下您无法从自动备份中还原.例如,如果您不小心删除了RDS实例并且没有创建最终快照,则将无法访问已完成的自动备份.但是,启用自动备份也很好,因为这将为您提供时间点还原.

From personal experience, I recommend doing both. I have the automated backup set to 8 days, and then I also have a script that will take a snapshot once per day and delete snapshots older than 7 days. The reason is because from what I understand, there are certain situations where you could not restore from the automated backup. For example, if you accidentally deleted your RDS instance and did not take a final snapshot, you would not be able to access the automated backups that were done. But it is also good to have the automated backups turned on because that will provide you the point-in-time restore.

希望这会有所帮助.

编辑

为回答您的评论,我在脚本创建快照时使用了某种命名约定.像这样:

To answer your comment, I use a certain naming convention when my script creates the snapshots. Something like:

autosnap- 实例名称 -2012-03-23

autosnap-instancename-2012-03-23

进行清理时,它将检索所有快照,查找该命名约定,解析日期,并删除任何早于特定日期的日期.

When it goes to do the cleanup, it retrieves all the snapshots, looks for that naming convention, parses the date, and deletes any older than a certain date.

我认为您也可以查看快照的创建日期,但这就是我最终完成快照的方式.

I think you could also look at the snapshot creation date, but this is just how I ended up doing it.

这篇关于我应该只坚持使用AWS RDS自动备份或数据库快照吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆