This topic describes how to restore the data of an ApsaraDB RDS for MySQL instance.

For more information about how to restore the data of an RDS instance that runs a different database engine, see the following topics:

Restore data to a new RDS instance

You can restore data to a new RDS instance, verify the data on the new RDS instance, and then migrate the data from the new RDS instance back to the original RDS instance. This feature was previously known as instance cloning.

Considerations

  • The new RDS instance must have the same IP addresses and CIDR blocks in the configured IP address whitelists as the original RDS instance. In addition, the new RDS instance must have the same backup settings and parameter settings as the original RDS instance.
  • The information about the data in the new RDS instance must be the same as the information about the specified data or log backup file of the original RDS instance.
  • The information about the account that is used to create the data or log backup is replicated to the new RDS instance.

Billing

You must pay for the new RDS instance. We recommend that you create a pay-as-you-go new RDS instance. After you complete the restoration operation, you can release the new RDS instance.

Procedure

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, click Backup and Restoration.
  3. Click Restore Database (Previously Clone Database).
  4. Configure the following parameters.
    Parameter Description
    Billing Method
    • Subscription: A subscription instance is an instance for which you pay an upfront fee. For long-term use, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You can receive larger discounts for longer subscription periods.
    • Pay-As-You-Go: You are charged an hourly fee for a pay-as-you-go instance based on your actual resource usage. The pay-as-you-go billing method is suitable for short-term use. If you no longer need a pay-as-you-go instance, you can release the instance to reduce costs.
    Restore Mode
    • By Time: This mode allows you to restore data to a specific point in time within the log backup retention period that you specify. The time is accurate to the second. For more information about how to view or change the log backup retention period, see Enable automatic backups for an ApsaraDB RDS for MySQL instance.
    • By Backup Set: This mode allows you to restore data from a data backup file. You can restore data only from the data backup file that is generated from a physical backup. You cannot restore data from the data backup file that is generated from a logical backup.
    Note The By Time option is available only when the log backup feature is enabled.
    Zone of Primary Node The zone where the RDS instance resides. Each zone is an independent physical location within a region. For example, the China (Hangzhou) region contains Zone H, Zone I, and Zone J. ApsaraDB RDS supports the following two deployment methods:
    • Multi-zone Deployment: The primary RDS instance and the secondary RDS instance reside in different zones to provide zone-disaster recovery. This is the recommended deployment method.
    • Single-zone Deployment: The primary RDS instance and the secondary RDS instance reside in the same zone.
    Note If you select the RDS Basic Edition, you can select only the Single-zone Deployment method.
    Instance Type The instance type of the RDS instance. Before you select an instance type, you must select an instance family.
    • General-purpose (Entry-level): A general-purpose instance exclusively occupies the allocated memory and I/O resources. However, it shares CPU and storage resources with the other general-purpose instances that are deployed on the same host.
    • Dedicated (Enterprise-level): A dedicated instance exclusively occupies the allocated CPU, memory, storage, and I/O resources. The dedicated host instance family is the highest configuration of the dedicated instance family. A dedicated host instance occupies all the CPU, memory, storage, and I/O resources on the host where the instance is deployed.
    Note For more information, see Primary ApsaraDB RDS instance types.
    Capacity The maximum amount of storage that is provisioned to store data files, system files, binary log files, and transaction files in the new RDS instance. You can adjust the storage capacity at a step size of 5 GB.
  5. Click Next: Instance Configuration.
  6. Configure the following parameters.
    Parameter Description
    Network Type
    • Classic Network: the traditional type of network.
    • VPC: the recommended type of network. A VPC is an isolated virtual network that provides higher security and higher performance than the classic network.
  7. Click Next: Confirm Order.
  8. Confirm the settings in the Parameters section, configure the Purchase Plan and Duration parameters, read and select Terms of Service, click Pay Now, and then complete the payment.
    Note If you select the subscription billing method for the new RDS instance, we recommend that you select Auto-Renew Enabled below the Duration parameter. This removes the need to renew the new RDS instance on a regular basis and prevents interruptions to your workloads on the new RDS instance due to overdue payments.

What to do next

  1. Log on to the new RDS instance and verify the data in the new RDS instance. For more information, see Connect to an ApsaraDB RDS for MySQL instance.
  2. Optional. Migrate the data that you need from the new RDS instance back to the original RDS instance. For more information, see Migrate data between RDS instances.
    Note The migration of data between two RDS instances does not interrupt the workloads that are run on the source RDS instance.

Restore data to the original RDS instance, a different existing RDS instance, or an on-premises database instance

Method 1

After you restore data to the new RDS instance, verify the data on the new RDS instance. Then, migrate the data from the new RDS instance to the original RDS instance, a different existing RDS instance, or an on-premises database instance. For more information, see Restore data to a new RDS instance.

Method 2

If a logical backup is created by Database Backup (DBS), you can restore the data of the generated data backup file to the original RDS instance, a different existing RDS instance, or an on-premises database instance.

For more information, see Restore a MySQL database from a logical backup.

FAQ

  • How do I restore one or more databases if I delete them by mistake?

    ApsaraDB RDS allows you to restore the databases that you delete by mistake. For more information, see Restore the individual databases and tables of an ApsaraDB RDS for MySQL instance. If your RDS instance does not support the restoration of individual databases or tables, you can restore the data of the deleted databases to a new RDS instance, verify the data on the new RDS instance, and then migrate the data from the new RDS instance back to your original RDS instance.

  • If my RDS instance does not have a data backup, can I restore data to a specific point in time?

    No, if your RDS instance does not have a data backup, you cannot restore data to a specific point in time. To restore data to a specific point in time, you must restore the data of a full data backup that was completed before the specified point in time. Then, you must restore the incremental data from the log backup file that was generated at the specified point in time.

  • When I create an RDS instance to which I want to restore data, why am I unable to select a vSwitch from the VSwitch of Primary Node drop-down list?

    If no vSwitches are available in the zone that you specify in the Basic Configurations step, you cannot select a vSwitch from the VSwitch of Primary Node drop-down list in the Instance Configuration step. In this case, click go to the VPC console. In the VPC console, create a vSwitch. Then, you can select a vSwitch from the VSwitch of Primary Node drop-down list.