All Products
Search
Document Center

Data Management:Practice guide for Data Disaster Recovery

Last Updated:Apr 22, 2025

This topic provides solutions to some common issues that may occur when you use Data Disaster Recovery.

How do I grant permissions to a RAM user to back up or restore data across Alibaba Cloud accounts?

  1. Log on to the RAM console by using the Alibaba Cloud account to which the source database instance belongs.

    Note

    Make sure that the AliyunDBSDefaultRole policy is attached to the Alibaba Cloud account to which the source database instance belongs.

  2. In the left-side navigation pane, choose Identities > Roles.

  3. Ceate a RAM role.

    1. Click Create Role and set the Principal Type parameter to Cloud Account.

    2. Set the Principal Name parameter to Current Account 164882xxxx and click OK.

    3. In the dialog box that appears, enter a role name such as ram-for-dbs and click OK.

  4. Grant the permissions to the RAM role.

    1. Go to the details page of the RAM role. On the Permissions tab, click Grant Permission.

    2. In the panel that appears, select the AliyunDBSFullAccess policy and click Grant permissions.

      Note

      If you set the Database Location parameter to Express Connect DB/VPN Gateway/Intelligent Gateway when you configure the backup schedule, you back up or restore the self-managed database instance by using a virtual private cloud (VPC). In this case, the AliyunVPCReadOnlyAccess policy must be attached to the RAM user.

  5. Edit the trust policy.

    1. On the Turst Policy tab, click Edit Trust Policy.

    2. On the Edit Trust Policy page, click the JSON tab and enter the following code.

      You must replace <Account ID> with the ID of the Alibaba Cloud account that you use to manage the backup schedule.

      {
       "Statement": [
           {
               "Action": "sts:AssumeRole",
               "Effect": "Allow",
               "Principal": {
                   "RAM": [
                       "acs:ram::<Account ID>:root"
                   ],
                   "Service": [
                       "<Account ID>@dbs.aliyuncs.com"
                   ]
               }
           }
       ],
       "Version": "1"
      }
  6. Click OK.

How do I back up and restore data across Alibaba Cloud accounts?

Back up data across Alibaba Cloud accounts

  1. Create a backup schedule.

  2. Configure the backup schedule.

    1. Set the Database Location parameter to a database instance that supports the cross-account backup feature. Then, click Cross Alicloud instance. image

    2. Enter the corresponding information in the Cross Alicloud UID and Role name fields.

      Cross Alicloud UID: the ID of the Alibaba Cloud account to which the source database instance belongs.

      Role name: the name of the RAM user to which the trust policy is attached. Example: ram-for-dbs.

      image

Restore data across Alibaba Cloud accounts

Configure a backup schedule and restore data.

Note

You cannot migrate the backup sets of databases across Alibaba Cloud accounts in the console.

How do I back up a database across accounts by using a public endpoint?

  1. Create a backup schedule.

  2. Configure the backup schedule.

  3. Set the Database Location parameter to User-Created Database with Public IP Address <IP Address:Port Number>.

Note

If the User-Created Database with Public IP Address <IP Address:Port Number> option is unavailable, join the DingTalk group whose ID is 35585947 or submit a ticket.

How can backup sets be automatically archived to a backup server?

  1. Create a backup schedule by using the O&M account.

  2. Manage the backup schedule by using the O&M account.

  3. Install a backup gateway on the backup server by using the backup account.

    Note

    If you do not have a backup server, purchase a server.

  4. On the Backup Schedules page, find the backup schedule that you want to manage and click Manage in the Actions column. On the Configure Task page, click Set backup set download rules in the Backup set download section. In the dialog box that appears, configure the parameters described in the following table. Perform this operation by using the O&M account.

    Note

    If the database engine in the backup schedule does not support the download of backup sets or the Backup Storage Type parameter is not set to DBS Storage (recommended), the Set backup set download rules button is not displayed in the console.

    Parameter

    Description

    Auto download status

    Specifies whether to enable automatic download. Select Enable.

    Target type

    By default, the parameter is set to the directory of the server on which the backup gateway is installed.

    Backup Gateway

    The backup gateway that is used by Data Disaster Recovery to connect to the on-premises device.

    Important

    The automatic backup set download feature is not yet commercially available and does not ensure stable performance. To prevent data accumulation and other exceptions, we recommend that you do not use the same backup gateway to download the backup data of multiple backup schedules.

    Target location

    The type of the location and the corresponding directory to which the backup set is downloaded. Valid values:

    • Server directory

    • FTP direction

    • NAS direction

    • Minio direction

    Full data format

    This parameter is automatically configured by the system and cannot be modified.

    Note

    For more information about the data format of full and incremental backup sets, see the "Feature limits and formats" section of the Overview topic.

    Incremental data format

    This parameter is automatically configured by the system and cannot be modified.

  5. Click OK.

  6. In the left-side navigation pane, click Backup Set Download to view the download progress. Perform this operation by using the O&M account.

How do I modify the backup lifecycle of a backup schedule?

  1. Log on to the DMS console V5.0.

  2. In the top navigation bar, choose Security and Specifications (DBS) > Data Disaster Recovery (DBS) > Backup Plan.

    Note

    If you use the DMS console in simple mode, move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner of the DMS console and choose All Features > Security and Specifications (DBS) > Data Disaster Recovery (DBS) > Backup Plan.

  3. Find the backup schedule that you want to manage and click Manage in the Actions column. The Configure Task page appears.

  4. In the Lifecycle Information section, click Edit Lifecycle.

  5. On the page that appears, modify the retention periods of full backup data and incremental backup data and click Save.

    fdfdf

    Important
    • You can specify a retention period in the range of 7 to 3,650 days. After the retention period expires, backup sets are automatically deleted.

    • If you do not enable incremental backup, you can specify a retention period only for full backup data in the console. For more information about how to enable incremental backup, see Enable or disable incremental log backup.

How do I retain minimal backup sets?

  • You can specify a lifecycle for each type of backup set when you configure a backup schedule or modify the lifecycle settings based on your business requirements by using one of the following methods:

  • When you configure a backup schedule, if you store backup data in Object Storage Service (OSS), you are not charged for storage. If you store backup data in built-in storage, you are charged for storage. The storage fees are calculated based on the actual data volume and storage duration. For more information, see Built-in storage and OSS and Storage fees.

    Note

    If your business involves a large volume of data, we recommend that you purchase storage plans to offset the storage fees that are incurred by the backup schedule. For more information, see Use storage plans.

  • You can also manually delete backup sets to reduce storage costs.

How do I back up and restore a self-managed database hosted on an Elastic Compute Service (ECS) instance?

  1. Create a backup schedule and set the Backup Method parameter to Logical Backup.

  2. Manage the backup schedule and set the Database Location parameter to ECS-Hosted Database.

How do I back up an ApsaraDB RDS for MySQL instance across regions?

  1. Apply for a public endpoint for the ApsaraDB RDS for MySQL instance.

  2. Create a backup schedule. The backup schedule and the source database are deployed in different regions. Set the Backup Method parameter to Logical Backup.

  3. Manage the backup schedule.

How do I back up a self-managed database across regions?

  1. Create a backup schedule and set the Backup Method parameter to Logical Backup.

  2. Manage the backup schedule and set the Database Location parameter to User-Created Database with Public IP Address <IP Address:Port Number>.

Note

If the User-Created Database with Public IP Address <IP Address:Port Number> option is unavailable, join the DingTalk group whose ID is 35585947 or submit a ticket.

How do I connect an ApsaraDB RDS for MySQL instance to Data Disaster Recovery over a VPC?

  1. Create a backup schedule.

  2. Create a gateway and configure routes. For more information, see Connect multiple offices to each other and to a VPC.

  3. Manage the backup schedule and set the Database Location parameter to Express Connect DB/VPN Gateway/Intelligent Gateway.

How do I use Database Gateway to back up on-premises databases or private databases on third-party clouds to OSS or Data Disaster Recovery?

  1. Install a backup gateway.

  2. Create a backup schedule and set the Backup Method parameter to Logical Backup.

  3. Manage the backup schedule and set the Database Location parameter to No public network IP: Port's self-built database (accessed through the database gateway).

How do I back up a self-managed database in a data center connected to Alibaba Cloud over Express Connect to OSS or Data Disaster Recovery?

  1. Create a backup schedule and set the Backup Method parameter to Logical Backup.

  2. Connect the data center to a VPC on Alibaba Cloud by using an Express Connect circuit. This way, the data center and the VPC can exchange data by using private connections. For more information, see Connect a data center to a VPC by using an Express Connect circuit.

  3. A static route is added on a machine in the data center to route traffic to CIDR blocks of Data Disaster Recovery servers. You can run the following command to add a static route: ip route CIDR block of Data Disaster Recovery servers {IP address of a VBR at the Alibaba Cloud side}. For more information about the CIDR blocks of Data Disaster Recovery servers, see the CIDR blocks of Data Disaster Recovery servers section of this topic.

  4. Manage the backup schedule and set the Database Location parameter to Express Connect DB/VPN Gateway/Intelligent Gateway.

How do I store the backup data of a self-managed Redis database in Alibaba Cloud?

  1. Create a backup schedule and set the Backup Method parameter to Logical Backup.

    Note
    • When you purchase a backup schedule, set the Data Source Type parameter to Redis and the Backup Method parameter to Logical Backup.

    • For more information about the minimum granularity that Data Disaster Recovery supports in backup and restoration of Redis databases, see Database engines and features.

  2. Manage the backup schedule and set the Database Location parameter to ECS-Hosted Database.

  3. Restore data to a Tair (Redis OSS-compatible) database.

  4. Change the backup source to a Tair (Redis OSS-compatible) database.

How do I back up and restore a self-managed MySQL database?

Prerequisites

Logical backup is complete.

Note
  • This feature supports only logical backups. Data Disaster Recovery does not allow you to restore data by database or table from a physical backup.

  • To perform a logical backup on a PolarDB-X database, you must back up the entire database instance. As a result, Data Disaster Recovery does not allow you to restore PolarDB-X data by database or table.

Back up and restore a self-managed MySQL database

For more information, see Logically back up and restore a MySQL database hosted on a third-party cloud or a self-managed MySQL database.

CIDR blocks of Data Disaster Recovery servers

Region

Data Disaster Recovery server CIDR block

China (Hangzhou)

100.104.217.0/24

China (Beijing)

100.104.119.0/24

China (Qingdao)

100.104.183.0/24

China (Shanghai)

100.104.191.0/24

China (Shenzhen)

100.104.81.0/24

China (Chengdu)

100.104.133.128/26

China (Ulanqab)

100.104.76.192/26

China (Heyuan)

100.104.127.0/26

South Korea (Seoul)

100.104.150.192/26

Thailand (Bangkok)

100.104.119.128/26

China (Hong Kong)

100.104.10.0/24

Singapore

100.104.10.0/24

Japan (Tokyo)

100.104.144.0/24

China (Hohhot)

100.104.40.0/24

China (Zhangjiakou)

100.104.48.0/24

US (Virginia)

100.104.220.0/24

US (Silicon Valley)

100.104.17.0/24

Germany (Frankfurt)

100.104.133.0/24

Malaysia (Kuala Lumpur)

100.104.10.0/24

Indonesia (Jakarta)

100.104.209.0/24

CIDR blocks of Finance Cloud servers

Region

Alibaba Finance Cloud server CIDR block

China (Hangzhou)

100.104.255.64/26

China (Shenzhen)

100.104.194.128/26

China (Shanghai)

100.104.45.64/26