从Amazon RDS下载MySql备份/快照 [英] Download MySql Backup/Snapshot from Amazon RDS

查看:512
本文介绍了从Amazon RDS下载MySql备份/快照的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在生产实例的Amazon RDS上托管了MySql数据库.我还有另一个用于开发目的的RDS实例.现在,我正在寻找将数据库备份/快照从生产实例还原到开发实例的最佳/最快方法,因为我的数据库非常庞大,备份下载过程非常耗时,并且会阻塞我的所有表以进行读/写事务.还是可以在不阻止插入/更新/选择事务的情况下进行下载备份?

I have hosted my MySql Database on Amazon RDS on my Production Instance. I have another RDS instance for Development purpose. Now I am looking for best/fastest way to restore database backup/snapshot from Production Instance to Development Instance, because My database is very huge and Backup downloading process is very time taking job as well as it's block my all tables for read/write transaction. Or Is there any option for download backup without blocking insert/update/select transaction?

谢谢.

这是我犯的一个错误,在上述问题中,我的意思是说 帐户 不是 实例 .我有两个不同的帐户,一个用于生产,另一个用于开发/测试.我想将快照从生产帐户的实例还原到开发帐户的实例,并且两个实例都位于同一区域(例如新加坡).

Here one mistake I have done, In above question I mean to say account not an Instance. I have two different accounts, one for production and another is for development/testing. I would like to restore snapshot from production account's instance to the development account's instance, and both instances are located in same region (e.g. singapore).

推荐答案

鉴于您已澄清,需要备份并将其放回不同的RDS实例,该实例位于不同的AWS账户中;进行sql-dump或数据库备份并重新还原的唯一方法;因为您无法在帐户之间拍摄和共享快照.

Given that you have clarified that you need to take the backup and put it back to a different RDS instance which in a different AWS Account; the only way you can do it to take the sql-dump or database backup and re-restore it; as you can't take and share the snapshot between accounts.

可以弥补I/O阻塞和事务瓶颈的一种方法是利用 Read-Replica .这样,整个备份过程将在Read-Replica中完成,并且您的主实例不会受到影响.

The one way you can kind of side line the I/O blocking and transaction bottlenecks is making use of Read-Replica. This way the entire backup process would be done in the Read-Replica and your main instance would not get affected / effected.

  • 创建一个只读副本
  • 允许副本尽可能多地填充
  • 然后应用您的SQL备份工具连接到该副本实例&创建备份
  • 将备份放入S3
  • 转到新实例并将其还原回

PS-注意事项:

  1. 由于我们使用的是只读副本,因此在主实例和只读副本之间可能存在陈旧(复制-滞后).在开始该过程之前,您需要考虑这一点.复制是异步进行的.

  1. As we are using a read-replica, there may be a stale ( replication - lag ) between the main-instance and read replica. You need consider that before starting the process. The replication happens asynchronously.

您应该尝试从EC2实例执行备份操作,以利用延迟,网络带宽管道.

You should try performing the backup operations from an EC2 instance to take advantage of the latency, networking bandwidth pipe.

这篇关于从Amazon RDS下载MySql备份/快照的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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