By Yuanyi
The incremental backup migration method supports various versions of SQL Server. This article uses SQL Server 2017 as an example to illustrate the configuration steps for the entire migration process. For detailed feature descriptions, please refer to the official documentation.
The migration method in this topic is suitable for the following scenarios:
• Migrate data to the destination database on your RDS instance in physical mode rather than in logical mode.
• Situations where downtime is critical and migrate data with minute-level downtime.
Note:
The incremental backup migration method supports various versions of SQL Server. This article uses SQL Server 2017 as an example to illustrate the configuration steps for the entire migration process. For detailed feature descriptions, please refer to the official documentation.
This solution can only migrate one database at a time to the cloud, so it is only applicable when only a single database within an instance needs to be migrated to the cloud. If all databases within an instance need to be migrated to the cloud at once, we recommend using the instance-level migration solution:
(2) For detailed configuration, you can refer to the best practices starting from line 202.
• The RDS instance has sufficient storage space.
• A high-privilege account is created for the RDS instance.
• The recovery mode of the local SQL Server database must be set to FULL mode.
SELECT name, recovery_model_desc FROM sys.databases WHERE name = 'model';
GO
• Execute the DBCC CHECKDB statement in the local database environment to ensure there are no allocation errors or consistency errors in the database. If no allocation errors or consistency errors occur, the following execution result is returned:
• The OSS service is activated.
Notes
The names of the backup files must be suffixed with bak, diff, trn, or log. The following list describes the suffixes:
Use SSMS to back up the database.
Note: Use a script to back up.
The region where the Bucket resides must be consistent with the region where the ECS instance and RDS instance reside if you upload data to the Bucket from an ECS instance over an internal network and then restore the data to the RDS instance over the internal network.
1. Access the RDS Instances page, select the region in which the RDS instance resides in the top navigation bar, and then click the target instance ID.
2. In the left-side navigation pane, click Backup and Restoration.
3. Click Migrate OSS Backup Data to RDS at the top of the page.
4. On the Data Import Wizard page, click Next twice to enter the data import step.
5. Configure the following parameters and click OK.
Configuration Item | Description |
---|---|
Cloud Migration Plan | Select Access Pending. Immediate Access (only one full backup file): Full backup data migration, suitable for scenarios where only one full backup file is to be migrated. At this time, the following parameter settings take effect in the CreateMigrateTask operation: BackupMode = FULL and IsOnlineDB = True. Access Pending (there are also differential backups or log files): Incremental data migration, suitable for scenarios where full backup files plus log backups (or differential backup files) are to be migrated. At this time, the following parameter settings take effect in the CreateMigrateTask operation: BackupMode = UPDF and IsOnlineDB = False. |
Please wait until the migration task is complete. You can click Refresh to view the latest status of the migration task.
After the full backup of the local database on the SQL Server instance is imported into the destination database on your RDS instance, you need to import differential or log backup files next.
Note: If you have multiple log backup files, you must use the same method to upload these files one by one.
Incremental data export:
Upload differential files to OSS for incremental migration to the cloud.
After importing all the files, the destination database on your RDS instance is in the In Recovery or Restoring state. If your RDS instance runs RDS High-availability Edition, the destination database is in the In Recovery state. If your RDS instance runs RDS Basic Edition, the destination database is in the Restoring state. In these cases, you cannot perform read or write operations on the destination database. Before you can perform read and write operations, you must open the destination database.
You can log on to the DMS console to view the data in the imported database:
View the data in the source database:
If there are multiple incremental files, add them multiple times. Through testing the incremental backup operations, users need to pause their applications for a very brief period, only stopping writes before the final LOG Backup.
Introduction to the Intelligent Elasticity Model of AnalyticDB
Best Practices for Importing Vector and Raster Data to GanosBase
Alibaba Clouder - December 13, 2017
Alibaba Clouder - August 2, 2019
Alibaba Clouder - July 22, 2020
5544031433091282 - July 1, 2022
ApsaraDB - November 5, 2024
Alibaba Clouder - August 6, 2020
Follow our step-by-step best practices guides to build your own business case.
Learn MoreAn on-demand database hosting service for SQL Server with automated monitoring, backup and disaster recovery capabilities
Learn MoreMigrating to fully managed cloud databases brings a host of benefits including scalability, reliability, and cost efficiency.
Learn MoreLeverage cloud-native database solutions dedicated for FinTech.
Learn MoreMore Posts by ApsaraDB