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. Such databases include ApsaraDB RDS, ApsaraDB for Redis, ApsaraDB for Memcache, ApsaraDB for MongoDB, and PolarDB databases, and self-managed databases that are connected over Express Connect, VPN Gateway, or Smart Access Gateway (SAG). This topic describes how to use DBS to back up and restore data of a source instance within an Alibaba Cloud account to a destination instance within another Alibaba Cloud account. In this example, data of an ApsaraDB RDS for MySQL instance is backed up and restored.

Prerequisites

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

Back up data across Alibaba Cloud accounts

  1. Log on to the DBS console.
  2. In the Note message indicating 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 destination instance.
    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. Set the Cross Alicloud UID and Role name parameters based on your business requirements.
    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 category of the source instance. Cross-account data backup is supported by ApsaraDB RDS, ApsaraDB for Redis, ApsaraDB for Memcache, ApsaraDB for MongoDB, and PolarDB databases, and self-managed databases that are connected over Express Connect, VPN Gateway, or SAG. In this example, RDS Instance is selected.
    Instance Region The source region that you selected on the buy page. You cannot change the value of this parameter.
    Cross Alicloud UID The Alibaba Cloud account to which the source instance belongs.
    Note You can log on to the Alibaba Cloud Management Console by using the Alibaba Cloud account to which the source instance belongs and view the account ID on the Basic Information page.
    Role name The name of the RAM role that you configured. In this example, ram-for-dbs is entered.
    RDS Instance ID The ID of the source instance. The drop-down list displays the IDs of the instances that belong to the Alibaba Cloud account specified by the Cross Alicloud UID parameter. In this example, the ID of an ApsaraDB RDS for MySQL instance is selected.
    Database Account The account that is used to log on to the source instance.
    Note The account must have the required permissions on the source instance. For more information, see Account permissions.
    Password The password that is used to log on to the source instance.
  9. Click Next in the lower-right corner. For more information about the subsequent steps, see Configure a backup schedule.

Restore data across Alibaba Cloud accounts

  1. Log on to the 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 use to restore data and click Manage in the Actions column.
  4. On the details page of the backup schedule, click Restore Database in the upper-right corner. For more information about the subsequent steps, see Restore a database.