Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Scenario 2: Full+Incremental Backup Migration

Updated on 2024-07-15 GMT+08:00

In this scenario, data is migrated continuously. After a full backup and restoration is complete, you can perform incremental migrations for several times to minimize service interruption. A complete restoration process involves restoring several incremental backup files. The destination DB instance will not be available until the last backup file is restored. You can determine whether the selected backup file is the last one.

This section uses a full+incremental migration as an example to describe how to perform a migration while minimizing service interruption.

Migration Diagram

Figure 1 Full+incremental migration

Migration Process

Figure 2 Flowchart

First Full Migration

  1. Export the full backup file of the database. For details, see Exporting Backup Files.
  2. Upload files to an OBS bucket. For details, see Uploading Backup Files.
  3. Log in to the DRS console.
  4. Click in the upper left corner and select a region and a project.
  5. Choose Service List > Databases > Data Replication Service.
  6. In the navigation pane on the left, choose Backup Migration Management. Then, click Create Migration Task.
  7. Enter the information about the migration task and backup file, and click Next.

    Figure 3 Migration task information
    Table 1 Migration task information

    Parameter

    Description

    Task Name

    The task name consists of 4 to 64 characters, starts with a letter, and can contain only letters (case-insensitive), digits, hyphens (-), and underscores (_).

    Description

    The description consists of a maximum of 256 characters and cannot contain the following special characters: !=<>'&"

    Database Type

    Select Microsoft SQL Server.

    Backup File Source

    Select OBS bucket.

    Bucket Name

    Select the bucket where the backup file is stored and the full backup file.

    NOTE:
    • The backup file of the Microsoft SQL Server must be in the .bak format. Multiple backup files can be selected at the same time.
    • A database cannot be split into different files for upload.
    • The bucket name, backup file name, or path cannot contain Chinese characters.
    • If the number of data records in a bucket exceeds 500, data overflow may occur. As a result, some data cannot be displayed. You can use an independent standard bucket with the public-read permission.

  8. On the Select Destination page, specify database information and click Next.

    Figure 4 Full migration database information
    Table 2 Microsoft SQL Server database information

    Parameter

    Description

    Destination RDS DB Instance Name

    Select a destination RDS DB instance.

    Backup Type

    Select Full.

    Full: indicates full backup files.

    Last Backup File

    A complete restoration process involves restoring several incremental backup files. The destination DB instance will not be available until the last backup file is restored. You can determine whether the selected backup file is the last one. Select Yes in either of the following scenarios:

    • Perform a one-time full migration.
    • The selected backup file is the last one to be restored.

    Select No in the scenario where you continue to restore databases using incremental backup files after a full backup restoration is performed. In this case, the destination database is in the restoring state and cannot be read or written.

    Overwrite Data

    You can determine whether to overwrite data in the destination database during the restoration if the destination DB instance contains a database with the same name as the backup database.

    NOTE:

    If you select this option, the destination databases with the same names as the backup databases will be overwritten. Exercise caution when performing this operation.

    Perform Pre-verification

    Specifies whether to perform pre-verification on the backup migration task. The default value is Yes.

    • Yes: To ensure successful migration and identify potential problems in advance, verify the validity, integrity, continuity, and version compatibility of backup files before restoration.
    • No: If pre-verification is not performed, the migration speed is faster, but you need to check the validity, integrity, continuity, and version compatibility of backup files on your own.

    Restore Database

    You can restore all or some of databases.

    • All: Restores all databases in the backup file. You do not need to enter the names of the databases to be restored. By default, all databases in the backup file are restored.
    • Custom: Restore specified databases from the backup file. You need to enter the names of the databases to be restored.

      The databases to be restored must be consistent with those for which the full or incremental backups are created.

    Reset Database Name

    If Restore Database is set to All, you can reset database names. If you enable Reset Database Name, the original database names in the backup file will be reset to new database names.

    Prerequisites:

    • The backup file contains only one database.
    • The backup file is a full backup file and is the last backup file. Select Full for Backup File and Yes for Last Backup Type.
    NOTE:

    The database name can be reset only when Backup Type is set to Full and Restore Database is set to All.

    Backup Database Name

    If Restore Database is set to Custom, specify Backup Database Name.

    The backup database name is case sensitive and must be the same as that in the backup file. The backup database name can contain a maximum of 256 bytes, and the new database name can contain a maximum of 128 bytes. Only letters, digits, hyphens (-), and underscores (_) are allowed.

    DRS also allows you to set an alias for the database to be restored.

  9. On the Confirm Task page, check the configuration details, read and agree to the agreement, and click Next.
  10. In the task list on the Backup Migration Management page, check whether the task is in the Restoring status. If the migration is successful, the task status becomes Successful.

First Incremental Migration

  1. Export the first incremental backup file of the database. For details, see Exporting Backup Files.
  2. Upload files to an OBS bucket. For details, see Uploading Backup Files.
  3. Log in to the DRS console.
  4. In the navigation pane on the left, choose Backup Migration Management. Then, click Create Migration Task.
  5. Enter the information about the migration task and backup file, and click Next.

    Figure 5 Incremental backup
    Table 3 Migration task information

    Parameter

    Description

    Task Name

    The task name consists of 4 to 64 characters, starts with a letter, and can contain only letters (case-insensitive), digits, hyphens (-), and underscores (_).

    Description

    The description consists of a maximum of 256 characters and cannot contain the following special characters: !=<>'&"

    Database Type

    Select Microsoft SQL Server.

    Backup File Source

    Select OBS bucket.

    Bucket Name

    Select the bucket where the backup file is stored and the first incremental backup file.

    NOTE:
    • The backup file of the Microsoft SQL Server must be in the .bak format. Multiple backup files can be selected at the same time.
    • A database cannot be split into different files for upload.
    • The bucket name, backup file name, or path cannot contain Chinese characters.

  6. On the Select Destination page, specify database information and click Next.

    Figure 6 Incremental migration database information
    Table 4 Microsoft SQL Server database information

    Parameter

    Description

    Destination RDS DB Instance Name

    Select a destination RDS DB instance.

    The destination RDS DB instance must be the same as the DB instance selected during full backup and restoration.

    Backup Type

    Select Incremental.

    Incremental: indicates log backup files.

    Last Backup File

    A complete restoration process involves restoring several incremental backup files. The destination DB instance will not be available until the last backup file is restored. You can determine whether the selected backup file is the last one. Select Yes in either of the following scenarios:

    • Perform a one-time full migration.
    • The selected backup file is the last one to be restored.

    Select No if the incremental backup is performed for the first time. In this case, the destination database is in the restoring state and cannot be read or written.

    Perform Pre-verification

    Specifies whether to perform pre-verification on the backup migration task. The default value is Yes.

    • Yes: To ensure successful migration and identify potential problems in advance, verify the validity, integrity, continuity, and version compatibility of backup files before restoration.
    • No: If pre-verification is not performed, the migration speed is faster, but you need to check the validity, integrity, continuity, and version compatibility of backup files on your own.

    Restore Database

    You can restore all or some of databases.

    • All: Restores all databases in the backup file. You do not need to enter the names of the databases to be restored. By default, all databases in the backup file are restored.
    • Custom: Restore specified databases from the backup file. You need to enter the names of the databases to be restored.

  7. On the Confirm Task page, check the configuration details, read and agree to the agreement, and click Next.
  8. In the task list on the Backup Migration Management page, check whether the task is in the Restoring status. If the migration is successful, the task status becomes Successful.

Second Incremental Migration

To minimize the service interruption caused by migration, you need to back up, upload, and restore transaction logs before service migration. These operations will restore historical data to the destination database, which greatly reduces the time for uploading and restoring the last transaction log backup during the migration.

  1. Before service migration, export new incremental backup files. For details, see Exporting Backup Files.
  2. Perform 2 to 4.
  3. Enter the information about the migration task and backup file, and click Next.

    Figure 7 Incremental backup
    Table 5 Migration task information

    Parameter

    Description

    Task Name

    The task name consists of 4 to 64 characters, starts with a letter, and can contain only letters (case-insensitive), digits, hyphens (-), and underscores (_).

    Description

    The description consists of a maximum of 256 characters and cannot contain the following special characters: !<>&'\"

    Database Type

    Select Microsoft SQL Server.

    Backup File Source

    Select OBS bucket.

    Bucket Name

    Select the bucket where the backup file is stored and the new incremental backup file.

    NOTE:
    • The backup file of the Microsoft SQL Server must be in the .bak format. Multiple backup files can be selected at the same time.
    • A database cannot be split into different files for upload.
    • The bucket name, backup file name, or path cannot contain Chinese characters.

  4. On the Select Destination page, specify database information and click Next.

    Figure 8 Incremental migration database information
    Table 6 Microsoft SQL Server database information

    Parameter

    Description

    Destination RDS DB Instance Name

    Select a destination RDS DB instance. The destination RDS DB instance must be the same as the DB instance selected during full backup and restoration.

    Backup Type

    Select Incremental.

    Incremental: indicates log backup files.

    Last Backup File

    A complete restoration process involves restoring several incremental backup files. The destination DB instance will not be available until the last backup file is restored. You can determine whether the selected backup file is the last one. Select Yes in either of the following scenarios:

    • Perform a one-time full migration.
    • The selected backup file is the last one to be restored.

    Select No if the incremental backup is performed before migration. In this case, the destination database is in the restoring state and cannot be read or written.

    Perform Pre-verification

    Specifies whether to perform pre-verification on the backup migration task. The default value is Yes.

    • Yes: To ensure successful migration and identify potential problems in advance, verify the validity, integrity, continuity, and version compatibility of backup files before restoration.
    • No: If pre-verification is not performed, the migration speed is faster, but you need to check the validity, integrity, continuity, and version compatibility of backup files on your own.

    Restore Database

    You can restore all or some of databases.

    • All: Restores all databases in the backup file. You do not need to enter the names of the databases to be restored. By default, all databases in the backup file are restored.
    • Custom: Restore specified databases from the backup file. You need to enter the names of the databases to be restored.

  5. On the Confirm Task page, check the configuration details, read and agree to the agreement, and click Next.
  6. In the task list on the Backup Migration Management page, check whether the task is in the Restoring status. If the migration is successful, the task status becomes Successful.

Checking Database Transactions

Before service migration, stop services and ensure that no unfinished transaction exists in the database. Otherwise, data may be lost during migration.

  1. Run the following statement to check whether the IP addresses of the service system are disconnected:

    select * from sys.dm_exec_connections;
    • If yes, all service system IP addresses are disconnected and the last incremental backup can be migrated.
    • If no, go to 2.

  2. If an IP address is not disconnected, run the following statement to query the sessions that are not closed:

    select * from sys.dm_exec_sessions;

    Run the following statement to view the transactions that are being executed:

    select * from sys.dm_tran_session_transactions;

    If the query result contains unclosed sessions and transactions that are being executed, go to 3.

  3. The last incremental backup can be migrated only after the transaction is complete, the session is closed, and the service system is disconnected.

Last Incremental Migration

After several incremental migrations, the two databases are almost consistent. During the transaction checks, services are stopped and no data will be generated. Then, you need to perform the last incremental migration to ensure the data consistency.

  1. Export the new incremental backup file of the database. For details, see Exporting Backup Files.
  2. Perform 2 to 4.
  3. Enter the information about the migration task and backup file, and click Next.

    Figure 9 Incremental backup
    Table 7 Migration task information

    Parameter

    Description

    Task Name

    The task name consists of 4 to 64 characters, starts with a letter, and can contain only letters (case-insensitive), digits, hyphens (-), and underscores (_).

    Description

    The description consists of a maximum of 256 characters and cannot contain the following special characters: !=<>'&"

    Database Type

    Select Microsoft SQL Server.

    Backup File Source

    Select OBS bucket.

    Bucket Name

    Select the bucket where the backup file is stored and the new incremental backup file.

    NOTE:
    • The backup file of the Microsoft SQL Server must be in the .bak format. Multiple backup files can be selected at the same time.
    • A database cannot be split into different files for upload.
    • The bucket name, backup file name, or path cannot contain Chinese characters.

  4. On the Select Destination page, specify database information and click Next.

    Figure 10 Incremental migration database information
    Table 8 Microsoft SQL Server database information

    Parameter

    Description

    Destination RDS DB Instance Name

    Select a destination RDS DB instance. The destination RDS DB instance must be the same as the DB instance selected during full backup and restoration.

    Backup Type

    Select Incremental.

    Incremental: indicates log backup files.

    Last Backup File

    Select Yes because it is the last incremental migration after services are stopped.

    Perform Pre-verification

    Specifies whether to perform pre-verification on the backup migration task. The default value is Yes.

    • Yes: To ensure successful migration and identify potential problems in advance, verify the validity, integrity, continuity, and version compatibility of backup files before restoration.
    • No: If pre-verification is not performed, the migration speed is faster, but you need to check the validity, integrity, continuity, and version compatibility of backup files on your own.

    Restore Database

    You can restore all or some of databases.

    • All: Restores all databases in the backup file. You do not need to enter the names of the databases to be restored. By default, all databases in the backup file are restored.
    • Custom: Restore specified databases from the backup file. You need to enter the names of the databases to be restored.

  5. On the Confirm Task page, check the configuration details, read and agree to the agreement, and click Next.
  6. In the task list on the Backup Migration Management page, check whether the task is in the Restoring status. If the migration is successful, the task status becomes Successful.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback