All Products
Search
Document Center

Back up and restore a database across accounts by using a public endpoint and IP address whitelist

Last Updated: Jun 11, 2020

Database Backup (DBS) allows you to back up and restore databases across accounts. You can back up a database under an account dedicated to database O&M and then store the backup data under another account dedicated to data backup. In this way, even when the database under the O&M account is deleted, you can restore the data from the backup account. In addition, backup data of the two accounts is isolated from each other to avoid the risk of losing certain data caused by database deletion. This topic describes how to back up and restore an ApsaraDB for RDS database across accounts.

Click here to get a one-month trial of DBS>>

How it works

You can back up an ApsaraDB for RDS database under an O&M account and store the backup data under a backup account. When the ApsaraDB for RDS database under the O&M account is deleted, you can restore the data from the backup account by using DBS.

  • The ApsaraDB for RDS database is under the O&M account. DBS is activated for the backup account.
  • The ApsaraDB for RDS database can be accessed through a public endpoint. The Classless Inter-Domain Routing (CIDR) blocks of the DBS server are added to the IP address whitelist of the ApsaraDB for RDS instance.
  • The ApsaraDB for RDS database is connected to DBS through the public endpoint. A backup schedule is configured for it in DBS.

Procedure

Create a backup schedule

Go to the DBS purchase page and purchase a DBS backup schedule. For more information, see Create a backup schedule.

Configure the backup schedule

  1. Log on to the DBS console. In the left-side navigation pane, click Backup Schedules. On the Backup Schedules page that appears, find the target backup schedule and click Configure Backup Schedule in the Actions column. In the Configure Backup Schedule wizard, set Database Location to User-Created Database with Public IP Address .
    1

  2. Click Set Whitelist. In the message that appears, view the CIDR blocks of the DBS server.
    2

  3. Log on to the ApsaraDB for RDS console. On the Instances page, find the target ApsaraDB for RDS instance and click the instance ID. On the instance details page that appears, click Data Security in the left-side navigation pane. On the Whitelist Settings tab, click Create Whitelist. In the dialog box that appears, configure the IP address whitelist for the instance.
    3

  1. Go to the DBS console . In the Configure Backup Schedule wizard, set the remaining parameters as required, including the public endpoint and port number used to connect to the ApsaraDB for RDS database. Click Test Connection. After the connectivity test is passed, continue with the follow-up configuration.

Restore the database

After the full backup schedule is configured, go to the details page of the backup schedule. On the Configure Task page, click Restore Database. In the configuration wizard, specify the time point accurate to seconds to which you want to restore the data and select the table to restore. DBS will quickly restore the data of the table.

The following figure shows how to select a single table for which you want to restore the data.  4

The following figure shows how to specify the time point accurate to seconds for the restore task. Note that you need to specify a time point within the available time range. 5