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.
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
Log on to the Database Backup (DBS) console.
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.
In the left-side navigation pane, click Backup Schedules.
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.
Find the backup schedule that you purchase and click Configure Backup Schedule in the Actions column.
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.
Click Cross Alicloud instance.
Configure the Cross Alicloud UID and Role name parameters based on your business requirements.
The backup mode that you selected on the buy page. You cannot change the value of this parameter.
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.
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.
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.
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.
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
Log on to the Database Backup (DBS) console.
In the left-side navigation pane, click Backup Schedules. In the top navigation bar, select a region.
On the Backup Schedules page, find the backup schedule that you want to manage and click Manage in the Actions column.
On the details page of the backup schedule, click Restore Database in the upper-right corner.
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.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.
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.
In the lower-right corner of the page, click Precheck.
DBS checks the preceding configurations, database connectivity, and database permissions.
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.
CIDR block of DBS servers
South Korea (Seoul)
China (Hong Kong)
US (Silicon Valley)
Malaysia (Kuala Lumpur)
Related API operations
Creates, configures, and starts a backup schedule.
Creates a restore task.
Starts a restore task.
Queries a list of restore tasks.
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.