Implementing Effective MySQL Database Backup Mechanisms

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介: Alibaba Cloud ApsaraDB for RDS for MySQL provides a variety of methods to synchronize data to a local self-built database.

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.

目录
相关文章
|
2月前
|
存储 容灾 安全
在阿里云RDS(Relational Database Service)迁移前准备目标区域选择
在阿里云RDS(Relational Database Service)迁移前准备目标区域选择
23 3
|
2月前
|
存储 关系型数据库 数据库
进行RDS(Relational Database Service)迁移时,资源需求分析
进行RDS(Relational Database Service)迁移时,资源需求分析
30 3
|
2月前
|
SQL 运维 关系型数据库
在阿里云RDS(Relational Database Service)进行跨区域迁移
在阿里云RDS(Relational Database Service)进行跨区域迁移
38 2
|
2月前
|
存储 运维 容灾
在规划阿里云RDS(Relational Database Service)跨区迁移
在规划阿里云RDS(Relational Database Service)跨区迁移
38 1
|
2月前
|
存储 监控 关系型数据库
在规划和准备阿里云RDS(Relational Database Service)跨区域迁移
在规划和准备阿里云RDS(Relational Database Service)跨区域迁移
19 1
|
4月前
|
SQL Oracle 关系型数据库
MySQL必知必会:MySQL中的Schema与DataBase
MySQL必知必会:MySQL中的Schema与DataBase
|
2月前
|
存储 关系型数据库 数据库
在进行RDS(Amazon Relational Database Service,亚马逊关系数据库服务)迁移时,兼容性审查
在进行RDS(Amazon Relational Database Service,亚马逊关系数据库服务)迁移时,兼容性审查
20 1
|
2月前
|
SQL 存储 关系型数据库
MySQL技能完整学习列表——1、数据库基础概念——1、关系型数据库(Relational Database)
MySQL技能完整学习列表——1、数据库基础概念——1、关系型数据库(Relational Database)
178 0
|
2月前
|
存储 关系型数据库 数据库
RDS(Relational Database Service)性能瓶颈
RDS(Relational Database Service)性能瓶颈
30 4
|
3月前
|
SQL 存储 关系型数据库
RDS(Relational Database Service)性能瓶颈
RDS(Relational Database Service)性能瓶颈
25 4

热门文章

最新文章