All Products
Search
Document Center

Database Backup:Back up and restore data across Alibaba Cloud accounts

Last Updated:Oct 16, 2023

Database Backup (DBS) allows you to back up and restore data across Alibaba Cloud accounts for databases that support the logical backup feature of DBS. The databases include ApsaraDB RDS databases, ApsaraDB for Redis databases, ApsaraDB for MongoDB databases, PolarDB databases, and self-managed databases that are connected over Express Connect, VPN Gateway, or Smart Access Gateway. This topic describes how to back up and restore data across Alibaba Cloud accounts by using DBS. In this example, ApsaraDB RDS for MySQL is used.

Prerequisites

  • The source database and DBS backup schedule belong to different Alibaba Cloud accounts.

  • A Resource Access Management (RAM) role is created within the Alibaba Cloud account to which the source database belongs and is granted the permissions to access resources within the Alibaba Cloud account. The RAM role is assigned to the Alibaba Cloud account to which the destination database belongs so that this Alibaba Cloud account can use DBS to access the resources within the Alibaba Cloud account to which the source database belongs. For more information, see Create a RAM role for data backup and restoration across Alibaba Cloud accounts.

Back up data across Alibaba Cloud accounts

  1. Log on to the Database Backup (DBS) console.

  2. If the Note message appears to remind you that no alert rule is configured for DBS, click OK. Then, the default alert rule DBS_EVENT_RULE is automatically configured.

    Note

    If the DBS_EVENT_RULE alert rule is configured, the message does not appear after you log on to the DBS console. In this case, you can skip this step. For more information about the DBS_EVENT_RULE alert rule, see Alert rules.

  3. In the left-side navigation pane, click Backup Schedules.

  4. On the Backup Schedules page, click Create Schedule in the upper-right corner to purchase a backup schedule for the database that you want to back up.

    Note

    For more information about how to create a backup schedule, see Purchase a backup schedule.

  5. Find the backup schedule that you purchase and click Configure Backup Schedule in the Actions column.

  6. In the Configure Backup Source and Destination step of the Configure Backup Schedule wizard, select an instance category that supports cross-account data backup from the Database Location drop-down list. In this example, RDS Instance is selected.

  7. Click Cross Alicloud instance.跨阿里云账号实例

  8. Configure the Cross Alicloud UID and Role name parameters based on your business requirements.

    image.png

    Parameter

    Description

    Backup Mode

    The backup mode that you selected on the buy page. You cannot change the value of this parameter.

    Database Location

    The instance category of the source database. Cross-account data backup is supported by ApsaraDB RDS databases, ApsaraDB for Redis databases, ApsaraDB for MongoDB databases, PolarDB databases, and self-managed databases that are connected over Express Connect, VPN Gateway, or Smart Access Gateway. In this example, an ApsaraDB RDS for MySQL instance is used.

    Instance Region

    The region in which the source database resides. The region is selected on the buy page.

    Cross Alicloud UID

    The ID of the Alibaba Cloud account to which the source database belongs.

    Note

    You can log on to the Account Center console with the Alibaba Cloud account to which the source database belongs and view the account ID on the Overview page.

    Role name

    The name of the RAM role that you configured. In this example, the role name is ram-for-dbs.

    RDS Instance ID

    The ID of the ApsaraDB RDS for MySQL instance to which the source database belongs. The drop-down list displays the IDs of the ApsaraDB RDS for MySQL instances that belong to the Alibaba Cloud account specified by the Cross Alicloud UID parameter.

    Important

    If the source or destination database is a self-managed database, you must manually add the CIDR block of DBS servers in the corresponding region to the security settings of the self-managed database to allow access from DBS servers. For more information, see Manually add the CIDR blocks of DBS servers to the security settings of self-managed databases.

    Database Account

    The account that is used to log on to the source database.

    Note

    The account must have the required permissions on the source database. For more information, see Account permissions.

    Password

    The password that is used to log on to the source database.

    Compliance warranty regarding cross-border data transfers:

    Read and agree to the statement of compliance by selecting the check box.

    Note

    For more information about the subsequent steps, see Configure a backup schedule.

Restore data across Alibaba Cloud accounts

  1. Log on to the Database Backup (DBS) console.

  2. In the left-side navigation pane, click Backup Schedules. In the top navigation bar, select a region.

  3. On the Backup Schedules page, find the backup schedule that you want to manage and click Manage in the Actions column.

  4. On the details page of the backup schedule, click Restore Database in the upper-right corner.

  5. In the Set Time Restored To step of the Create Restore Task wizard, set the parameters in the Set Time Restored To and Configure Destination Database sections. Then, click Next in the lower-right corner of the page.

    Restore a MySQL database
    Note

    DBS allows you to restore a database such as MySQL or SQL Server to a new ApsaraDB RDS instance without the need to create the instance in advance.

  6. In the Configure Objects to Restore step, set the Conflict Handling parameter and specify the databases or tables to be restored in the Objects to Restore section.

    DBS can restore an entire database instance, one or more databases, or one or more tables. For more information, see Restore data by database or table. Specify the databases or tables to be restored

  7. In the lower-right corner of the page, click Precheck.

    DBS checks the preceding configurations, database connectivity, and database permissions.

  8. After the Precheck Passed message appears in the Precheck dialog box, click Start Task.

    To view the database restoration progress, click Restore Tasks in the left-side navigation pane.

    Note

    The amount of time used to restore a database depends on the specifications of the backup schedule and the size of the database. For more information, see Performance tests on backup and restoration.

    If you restore a database to a new ApsaraDB RDS instance, it takes about 5 to 10 minutes for the instance to be created. After the database is restored, you can view the new ApsaraDB RDS instance in the ApsaraDB RDS console. Alternatively, perform the following steps to view the new ApsaraDB RDS instance: On the Restore Tasks page, click the ID of the restore task. On the page that appears, click the ID of the ApsaraDB RDS instance in the Basic Information section. You are navigated to the ApsaraDB RDS console.

CIDR blocks of DBS servers

In the preceding configurations, the CIDR block of DBS servers that is used resides in the region where the data center is connected to a VPC on Alibaba Cloud by using an Express Connect circuit. The following table describes the CIDR blocks of DBS servers that are supported in various regions for connections to VPCs over Express Connect.

Region

CIDR block of DBS servers

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

India (Mumbai)

100.104.88.64/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

Australia (Sydney)

100.104.234.0/24

Germany (Frankfurt)

100.104.133.0/24

Malaysia (Kuala Lumpur)

100.104.10.0/24

Indonesia (Jakarta)

100.104.209.0/24

Related API operations

Operation

Description

CreateAndStartBackupPlan

Creates, configures, and starts a backup schedule.

CreateRestoreTask

Creates a restore task.

StartRestoreTask

Starts a restore task.

DescribeRestoreTaskList

Queries a list of restore tasks.

FAQ

Q: Can I migrate the backup sets of databases across Alibaba Cloud accounts in the DBS console?

A: No, you cannot migrate the backup sets of databases across Alibaba Cloud accounts in the DBS console.