Implementing Effective MySQL Database Backup Mechanisms

Galera_to_be_phased_out_MySQL_Group_Replication_officially_launched

Data reliability is crucial for the stability of business systems. Despite the advancements in data reliability technologies, enterprises should not ignore the importance of backing up data. Alibaba Cloud ApsaraDB for RDS for MySQL helps you easily configure and implement effective backup mechanism with restoration capability. This document covers a variety of ways for you to synchronize data, focusing on restoring data from ApsaraDB for RDS for MySQL to a local self-built database.

1.If there are no add, delete and edit operations to data on the RDS, you can generate a physical backup or logical backup, and then import the physical backup or logical backup data to your self-built database through Xtrabackup or mysqldump.

2.If there are add, delete and edit operations to the database after the physical backup has been generated, you need to append the subsequent binlog file after restoring the physical backup. You can get the binlog file through the API/console to append the incremental data.

Note that apart from the data and index files, the extracted physical backup files also include the following files shown in the figure below.

25

Since binlog is applied on the physical backup, you need to record the position (pos point) of the binlog. All RDS databases use the primary-secondary architecture to ensure high availability. To ensure that the primary database can continue providing external services, the backup operations are performed on the secondary databases. However, the binlog files may be generated on either the primary database or the secondary database (the pos points of the two binlog files are inconsistent). Either one of them may be provided to the user. Therefore, two pos points of binlog files are provided in the physical backup file, as shown in the figure below:

26

You should test both pos points before applying the binlog. Be sure to use the pos point that can be found in the binlog.

3.You can use the data subscription feature of Data Transmission Service if you want to synchronize the incremental data on Apsara RDS to the binlog of the self-built database. You can consume incremental data through the SDK and then apply the data on your own. The operation interface is shown below. In the example below, you can consume the incremental data from 2015-9-18 16:38:11 to 2015-09-19 17:37:44.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值