All Products
Search
Document Center

ApsaraDB RDS:Restore the backup data of a self-managed instance that runs MySQL 5.7 or MySQL 8.0 to an ApsaraDB RDS for MySQL instance

Last Updated:Mar 28, 2026

This procedure migrates a self-managed MySQL 5.7 or MySQL 8.0 instance to ApsaraDB RDS by importing its full backup file through the console and restoring it to a new RDS instance.

If data changes occur in the source instance during the backup, the backup file captures log data that you can use to sync incremental changes to the RDS instance. For more information, see Overview of data restoration methods.

Prerequisites

Before you begin, ensure that you have:

  • A self-managed MySQL 5.7 or MySQL 8.0 instance that meets the migration requirements. See Limits for supported configurations

  • A full backup of the self-managed instance uploaded to an OSS bucket. The backup file must be in _QP.XB format, or packaged as TAR.GZ. See Perform a full backup and upload to OSS for instructions

Step 1: Import the backup file

  1. Log in to the ApsaraDB RDS console. In the top navigation bar, select the target region. In the left-side navigation pane, click Backups.

  2. On the User Backups tab, click Import Backup.

  3. In the Import Guide wizard, follow the on-screen instructions through steps 1 and 2, then proceed to Step 3: Import the data.

    Steps 1 and 2 in the wizard cover backing up the source database and uploading the backup to OSS. If you have already completed these steps, click Next to skip them.
  4. On the Step 3: Import the data page, configure the following parameters, then click OK.

    If ApsaraDB RDS is not authorized to access OSS, click Authorize at the bottom of the page. On the authorization page, click Confirm Authorization Policy in the lower-left corner.
    ParameterDescription
    MySQL versionAutomatically set to 5.7/8.0. Read-only.
    RegionThe region of the OSS bucket that stores the backup file. Must match the region you selected in step 1.
    OSS BucketThe OSS bucket that contains the backup file.
    OSS file nameThe name of the backup file object in the OSS bucket. Fuzzy and exact match are supported. The file must be in _QP.XB format or packaged as TAR.GZ.
    NoteAn optional description to identify this backup.
    ZoneThe zone of the OSS bucket. RDS creates a snapshot in this zone in single-digit seconds, which speeds up the import. The new RDS instance is created in this zone.
    Storage CapacityThe storage allocated for the backup. Valid range: 20–6,000 GB. Defaults to 3x the backup file size, with a minimum of 20 GB.
  5. Wait for the verification task to complete. On the User Backups tab, monitor the Status column until it changes from Verifying to Completed.

    Important

    Verification time varies based on instance activity during the backup. Expect longer verification times if the source instance had heavy write activity (generating large redo logs) or large active transactions during the backup window.

Step 2: Restore the backup to a new RDS instance

Important

Full backup files are retained for 3 days by default. Restore the backup within the retention period. To extend the retention period, see Adjust the retention period below.

  1. Log in to the ApsaraDB RDS console. In the top navigation bar, select the target region. In the left-side navigation pane, click Backups.

  2. On the User Backups tab, find the backup and click Restore in the Actions column.

  3. Configure the basic instance settings, then click Next: Instance Configuration.

    ParameterDescription
    Zone of Primary NodeThe zone for the primary RDS instance. This parameter appears only if you did not select a zone when importing the backup.
    Storage TypeSelect a storage type: ESSD PL1 (Enterprise SSD, performance level 1) or Standard SSD (elastic block storage that separates compute from storage). See Storage types for a comparison.
    Instance TypeSelect the instance type. General-purpose (Entry-level) instances have dedicated memory and I/O resources, with CPU and storage shared across instances on the same host. Each instance type defines CPU cores, memory, maximum connections, and maximum IOPS. See Primary ApsaraDB RDS instance types.
    Storage CapacityStorage for the RDS instance, covering data files, system files, log files, and transaction files. Adjust in 5 GB increments.
  4. Configure the network and instance parameters, then click Next: Confirm Order.

    ParameterDescription
    Network TypeSelect VPC. A virtual private cloud (VPC) provides better security and performance than the classic network. Also configure the VPC and vSwitch of Primary Node parameters. The RDS instance and any ECS instance you connect must be in the same VPC.
    Parameter TemplateSelect a system or custom parameter template. See Use a parameter template.
    Time ZoneThe time zone for the RDS instance.
    Table Name Case SensitivityWhether table names are case-sensitive. Select Case-sensitive if the self-managed instance uses case-sensitive table names, to avoid data migration issues.
  5. Review the configuration in the Parameters section, select a Purchase Plan, accept the Terms of Service, and click Pay Now.

    RDS takes 1–5 minutes to create the instance.

Manage backup files

After the migration, manage the imported backup file from the ApsaraDB RDS console — navigate to the target region and click Backups in the left-side navigation pane.

Adjust the retention period

By default, imported full backup files are deleted after 3 days. Adjust the retention period if you need more time or want to keep the file permanently.

  1. On the User Backups tab, find the backup and click Set Retention Period in the Expiration Time column.

  2. Select a preset retention period from the drop-down list, or select Custom Retention Period and enter a value.

    If the expiration time exceeds 2099, it displays as Permanent.
  3. Click OK.

Add or update tags

  1. On the User Backups tab, find the backup and click +Add in the Tags column.

  2. In the dialog, click Create a label, fill in the Key and Value fields, and click OK next to the fields to create the tag. Click OK in the lower-right corner.

    To use an existing tag, select it from the Select the label drop-down list instead.
  3. To update a tag, hover over it and click edit, then repeat step 2.

Check binary log data

If data changed in the source instance during the backup, the backup file contains binary log entries recording those changes. Use these entries to sync incremental data to the RDS instance.

  1. On the User Backups tab, find the backup and click View Details in the Actions column.

  2. In the dialog, note the following log fields: For instructions on applying incremental data, see Step 3: Back up the self-managed MySQL instance and migrate the backup data to the RDS instance.

    FieldDescription
    Master_Log_FileThe name of the first binary log file containing incremental data.
    Master_Log_PositionThe position of the first incremental data entry in that log file.

Delete the backup file

Delete the file when you no longer need it to free up storage.

  1. On the User Backups tab, find the backup and click Delete in the Actions column.

  2. Click OK to confirm.

Other operations

On the User Backups tab, use the icons in the upper-right corner for additional operations:

  • Filter columns — Show or hide columns. Click 自定义列表项 to open the column selector. Move columns between the hidden (left) and visible (right) lists using the 右 and 左 icons, then click OK.

  • Export backup list — Click 导出资源列表 to export the backup list as a CSV file.

  • Refresh — Click 刷新 to reload the tab.

What to do next

After the RDS instance is running, complete the migration by syncing any incremental data from the source instance: