Implementing Effective MySQL Database Backup Mechanisms

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介: 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.

目录
相关文章
|
7月前
|
存储 容灾 安全
在阿里云RDS(Relational Database Service)迁移前准备目标区域选择
在阿里云RDS(Relational Database Service)迁移前准备目标区域选择
72 3
|
7月前
|
存储 关系型数据库 数据库
进行RDS(Relational Database Service)迁移时,资源需求分析
进行RDS(Relational Database Service)迁移时,资源需求分析
77 3
|
7月前
|
SQL 运维 关系型数据库
在阿里云RDS(Relational Database Service)进行跨区域迁移
在阿里云RDS(Relational Database Service)进行跨区域迁移
185 2
|
2月前
|
存储 关系型数据库 MySQL
环比、环比增长率、同比、同比增长率 ,占比,Mysql 8.0 实例(最简单的方法之一)(sample database classicmodels _No.2 )
环比、环比增长率、同比、同比增长率 ,占比,Mysql 8.0 实例(最简单的方法之一)(sample database classicmodels _No.2 )
131 1
|
2月前
|
SQL 前端开发 关系型数据库
全表数据核对 ,行数据核对,列数据核对,Mysql 8.0 实例(sample database classicmodels _No.3 )
全表数据核对 ,行数据核对,列数据核对,Mysql 8.0 实例(sample database classicmodels _No.3 )
57 0
全表数据核对 ,行数据核对,列数据核对,Mysql 8.0 实例(sample database classicmodels _No.3 )
|
2月前
|
关系型数据库 MySQL 数据库
mysql 8.0 递归(例子分享)(sample database classicmodels _No.4)
本文介绍了如何在MySQL8.0中使用递归查询处理部门表和员工表的树形结构数据,包括查看文档、准备数据、递归处理以及提取层级信息。作者通过示例展示了WITHRECURSIVE语句的应用及其在数仓中的结构表示。
40 2
|
2月前
|
安全 关系型数据库 MySQL
mysql8.0 正值表达式Regular expressions (sample database classicmodels _No.5)
本文介绍了MySQL8.0中的正值表达式及其相关函数,通过实例展示了如何使用正则表达式进行字符串匹配,并提出了关于执行效率的问题。
68 1
|
2月前
|
SQL 关系型数据库 MySQL
介绍5款 世界范围内比较广的 5款 mysql Database Management Tool
介绍5款 世界范围内比较广的 5款 mysql Database Management Tool
104 0
|
2月前
|
算法 关系型数据库 MySQL
复购率 mysql 实例(sample database classicmodels _No.1 )
复购率 mysql 实例(sample database classicmodels _No.1 )
33 0
|
4月前
|
存储 SQL 关系型数据库
在 MySQL 中使用 Drop Database
【8月更文挑战第11天】
163 0
在 MySQL 中使用 Drop Database

推荐镜像

更多