RDS Best Practices — Fast and Stable Migration to RDS

本文涉及的产品
云数据库 RDS SQL Server,独享型 2核4GB
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
云数据库 RDS MySQL Serverless,价值2615元额度,1个月
简介: In this article, I will explain how to perform fast and stable migration to RDS.

Database_tuning_practices

In this article, I will explain how to perform fast and stable migration to RDS.

Data migration to RDS can be started once the purchase has been made. When the RDS begins providing services, users can only dump user databases as a SQL file and then source the SQL file to RDS: migrating data to RDS–MySQL by using the MySQL dump tool and migrating data to RDS–SQL Server by using the SQL Server client tool. These two methods are the simplest, but also have many limitations:

The user's database is too big and the logical SQL import method is slow, causing significant downtime.

Too many errors occur during import, or the import process is interrupted. Therefore, the import needs be started over again.

The user's database must still provide services during migration to RDS.

A lot of users shy away from moving their services to the cloud because of data migration, making it the only thing that stands between them and RDS. However, as Confucius once said, "a craftsman who wishes to do his work well must first sharpen his tools". In order to help users better access the cloud, RDS has improved the existing RDS migration methods, aiming at helping users perform fast and stable migration to RDS. Improved MySQL and SQL Server migration tools are separately provided:

The MySQL migration tool supports online migration where users can migrate data to RDS without interrupting service.

The SQL Server migration tool uploads users' physical backups to an FTP and then restores the physical backups to RDS, which improves migration speed.

These two tools have been integrated in the RDS console. Refer to the official guide for RDS in the documentation center.

When most users look at a console, they can only see a black box. It's not uncommon to see users raising tickets through the console regarding the principles of. Here I will roughly describe the implementation process for each tool:

Principle of MySQL Online Migration:

Step 1: Pre-check, mainly used to verify whether the network is connected and check the account and environment.

Step 2: Full backup, where all user data will be dumped and then restored to RDS.

Step 3: Incremental migration, where binlog applications generated during full backup and the following steps will all be parsed to RDS.

Step 4: Switching, where the RDS data has completely overtaken the user's database and switching can begin.

The MySQL online migration tool has some limitations, however. For example:

• MySQL 5.0 only supports full migration, and does not support incremental migration;

• Migration with MySQL 5.6 is not supported, as the storage process and trigger migration are not supported;

• During migration, incremental migration will fail if ddl occurs.

Principle of SQL Server Tool Migration:

Step 1: Physical backup is performed on local databases.

Step 2: The backups are uploaded to an FTP server provided by RDS (the FTP address supports uploading via both a private network and a public network).

Step 3: After RDS scans and verifies user's uploaded backups, the backups are restored to the RDS.

Step 4: The user switches the application to RDS.

Because SQL Server hasn't opened the log interface, RDS currently cannot support online migration. RDS currently does not support importing from the master database.

I hope that this article will help you in your journey with RDS.

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
关系型数据库 PostgreSQL RDS
Partitioned Index - Alibaba Cloud RDS PostgreSQL Best Practices
When should you partition a table in your database? Learn how to split tables with partial index.
2047 0
|
SQL 关系型数据库 C语言
Full-text Search Index Optimization - Alibaba Cloud RDS PostgreSQL Best Practices
Will indexes be used in full-text searches that do not contain a certain keyword? Learn more about GIN, Generalized Inverted Index.
3936 0
|
SQL 机器学习/深度学习 关系型数据库
RDS SQL Server– Best Practices of Execution Plan Cache for Missing Indexes
Execution plan cache is a significant part of SQL Server memory management. It can reveal to you how the execution of a query will occur, or how query execution took place.
2710 0
|
2天前
|
存储 Oracle 关系型数据库
oracle 数据库 迁移 mysql数据库
将 Oracle 数据库迁移到 MySQL 是一项复杂的任务,因为这两种数据库管理系统具有不同的架构、语法和功能。
11 0
|
9天前
|
关系型数据库 MySQL Linux
【MySQL-10】数据库函数-案例演示【字符串/数值/日期/流程控制函数】(代码演示&可cv代码)
【MySQL-10】数据库函数-案例演示【字符串/数值/日期/流程控制函数】(代码演示&可cv代码)
【MySQL-10】数据库函数-案例演示【字符串/数值/日期/流程控制函数】(代码演示&可cv代码)
|
9天前
|
SQL 关系型数据库 MySQL
【MySQL-5】DDL的数据库操作:查询&创建&删除&使用(可cv代码+演示图)
【MySQL-5】DDL的数据库操作:查询&创建&删除&使用(可cv代码+演示图)
|
9天前
|
SQL 关系型数据库 MySQL
【MySQL-1】理解关系型数据库&数据的数据模型
【MySQL-1】理解关系型数据库&数据的数据模型
|
10天前
|
关系型数据库 MySQL 数据库
Docker数据库Mysql
Docker数据库Mysql
|
10天前
|
存储 SQL 关系型数据库
mysql查询数据库表大小怎么操作
mysql查询数据库表大小怎么操作
|
11天前
|
关系型数据库 MySQL PHP
【PHP 开发专栏】PHP 连接 MySQL 数据库的方法
【4月更文挑战第30天】本文介绍了 PHP 连接 MySQL 的两种主要方法:mysqli 和 PDO 扩展,包括连接、查询和处理结果的基本步骤。还讨论了连接参数设置、常见问题及解决方法,如连接失败、权限和字符集问题。此外,提到了高级技巧如使用连接池和缓存连接信息以优化性能。最后,通过实际案例分析了在用户登录系统和数据管理中的应用。