克隆AWS RDS数据库的最有效方法? [英] Most efficient way to clone an AWS RDS database?

查看:148
本文介绍了克隆AWS RDS数据库的最有效方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在名为X和Y的服务器上运行2个MySQL数据库,它们的内容相同.全天进行一系列更新,从而更改X的内容.在一天结束时,运行一个过程,将X的内容与Y的内容(对于各种表)进行比较,以发现新的行,并进行更新.行数据等.处理完更新后,将使用 mysqldump 转储X,然后使用转储覆盖Y.现在,X和Y再次相同,并且重复整个过程.

I have 2 MySQL databases running on a server called X and Y, which both have identical content. A series of updates run throughout the day, which changes the content of X. At the end of the day, a process runs that compares the content of X with the content of Y (for various tables) in order to discover new rows, updated row data etc. Once the updates have been processed, mysqldump is used to dump X and then Y is overwritten with the dump. Both X and Y are now the same again, and the whole process repeats.

我正在调查这些数据库到Amazon RDS的迁移.完成上述过程的最有效方法是什么?

I'm investigating migration of these databases to Amazon RDS. What's the most efficient way to accomplish the process outlined above?

我知道我可以为数据库拍摄快照并还原它,但是我认为这仅在实例级别?这意味着我必须运行2个实例,这似乎是不必要的.我在同一个实例上运行两个数据库都没有问题(我不想不必要为多个实例付费).

I understand that I can take a snapshot of a DB and restore it, but I think this is at the instance level only? That would mean I have to run 2 instances, which seems unnecessary. I don't have a problem running both databases on the same instance (I don't want to pay for more than one instance unnecessarily).

我是否只是做我现在正在做的事情,即 mysqldump X并将其还原为Y,还是RDS提供了其他方法/快捷方式?

Do I just do what I'm doing now i.e. mysqldump X and restore it to Y, or is there some other method/shortcut that RDS provides?

推荐答案

考虑迁移到RDS Aurora for MySQL.

Consider migrating to RDS Aurora for MySQL.

它支持整个数据库的本地写时复制副本(意味着服务器实例,而不是架构)无需进行实际的复制".

It supports native copy-on-write clones of the entire database (meaning server instance, not schema) without the need to make an actual "copy."

写时复制意味着原始"服务器和克隆"共享相同的物理磁盘(称为Aurora群集卷,它使用4/6仲裁在3个可用区域中自我复制两次).两台共享相同磁盘块的服务器直到其中一个进行更改...这是复制操作实际发生的时间(写时").因此,您只需要使用存储原始工作数据集以及克隆后发生的更改所需的存储空间即可.

Copy-on-write means the "original" server and the "clone" share the same physical disk (called an Aurora Cluster Volume, which is replicates itself twice across 3 availability zones, using a 4/6 quorum), with both servers sharing the same disk blocks until one of them makes a change... which is when the copy action actually occurs ("on write"). So, you only use as much storage as is required to store your original working data set plus changes that occurred after cloning.

在这种设置中,没有服务器是主服务器-克隆后它们都独立运行.我怀疑我没有按照自己的描述来做这种创新正义-它涉及很多黑魔法.请参阅文章(写时复制插图): http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.Clone.html

No server is the master in such a setup -- they all operate independently after cloning. I suspect that I'm not doing this innovation justice with my description -- it involves quite a bit of dark magic. See the write-up (with illustrations of copy-on-write): http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.Clone.html

Aurora与MySQL 5.6兼容.更准确地说,Aurora MySQL 5.6,删除了MyISAM,并对InnoDB进行了大量重写,以优化性能并使用复制的Aurora群集卷存储技术.

Aurora is compatible with MySQL 5.6. To be more precise, Aurora is MySQL 5.6, with MyISAM removed and InnoDB heavily rewritten to optimize performance and work with the replicated Aurora Cluster Volume storage technology.

这篇关于克隆AWS RDS数据库的最有效方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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