Updated on 2024-01-02 GMT+08:00

Scenario 1: Full Backup Migration

In this scenario, you need to stop services, upload the exported full backup file of the Microsoft SQL Server database to OBS, and then restore the backup data to the destination database.

This section describes how to migrate a full backup.

Migration Diagram

Figure 1 Full migration

Migration Process

Figure 2 Migration process

Procedure

  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 File Format

    Select Full.

    Full: indicates full backup files.
    NOTE:

    To migrate databases at a time, you need to stop services first and upload full backups for restoration.

    Last Backup

    Select Yes if you perform a one-time full migration.

    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.