Database Backup Service (DBS) practice guide
Common solutions for Database Backup Service (DBS) scenarios including cross-account backup, geo-redundant backup, and disaster recovery.
Configure RAM for cross-account backup and restore
-
Log on to the Resource Access Management (RAM) console with the Alibaba Cloud account that owns the source database instance.
NoteEnsure that the account that owns the source database instance has the AliyunDBSDefaultRole permission.
-
In the left-side navigation pane, choose Identities > Roles.
-
Create a RAM role:
-
Click Create Role. In the Select Trusted Entity step, select Alibaba Cloud Account.
-
For Select Trusted Alibaba Cloud Account, select
Current Alibaba Cloud Account, and then click OK. -
In the dialog box that appears, enter a role name, for example,
ram-for-dbs, and click OK.
-
-
Grant permissions to the role:
-
On the details page of the role, click the Permissions tab and then click Grant Permission.
-
In the panel that appears, select System Policy as the authorization scope.
-
Based on the Database Location, select the required policies.
-
RDS instance:
AliyunRDSReadOnlyAccessandAliyunVPCReadOnlyAccess -
Self-managed database connected over Express Connect, a VPN Gateway, or Smart Access Gateway:
AliyunVPCReadOnlyAccess -
PolarDB:
AliyunPolardbFullAccess
-
-
Click OK.
-
-
Modify the trust policy:
-
On the role details page, click the Trust policy > Edit trust policy.
-
On the Edit Trust Policy page, click JSON Editor and enter the following policy.
Replace
<Account ID>with your main account ID.{ "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "RAM": [ "acs:ram::<Account ID>:root" ], "Service": [ "<Account ID>@dbs.aliyuncs.com" ] } } ], "Version": "1" }
-
-
Click Save to complete the RAM authorization.
Cross-account backup and restore
Configure a cross-account backup
-
-
In the Database Location section, select an instance that supports the cross-account feature, and then select Cross-Alibaba Cloud account instance.
In the configuration form, specify the Instance region, RDS instance ID, Database Account, and Password, and then click Test Connection. For Connection Method, select Non-encrypted Connection or SSL Encrypted Connection. At the bottom of the page, select the Data Cross-Border Compliance Commitment checkbox.
-
In the Cross-Alibaba Cloud Account ID and Role Name fields, enter the required information.
-
Cross-Alibaba Cloud Account ID: The ID of the primary Alibaba Cloud account that owns the source database instance.
-
Role Name: The name of the RAM role that you created in the source account, such as
ram-for-dbs. This role must have the required trust policy attached.
After completing the configuration, click Check Cross-account Role Authorization.
-
-
Configure a cross-account restore
Configure a backup schedule and restore data.
You cannot migrate backup sets across Alibaba Cloud accounts in the console.
Cross-account backup over a public endpoint
-
Set Database Location to User-Created Database with Public IP Address <IP Address:Port Number>.
If the User-Created Database with Public IP Address <IP Address:Port Number> option is unavailable, search for the DingTalk group ID 35585947 or submit a ticket to request access.
Automatically archive backup sets
-
Use an operations account to create a backup schedule.
-
Use an operations account to configure the backup schedule.
-
Use a backup account to install a backup gateway on the backup server.
NoteIf you do not have a backup server, purchase a server first.
-
Using your operations account, find the target backup schedule and click Manage in the Actions column. On the Configure Task page, go to the Backup set download section and click Set backup set download rules. In the dialog box that appears, configure the parameters as described in the following table.
NoteThis button appears only if the source database engine supports backup set downloads and the storage destination is DBS built-in storage.
Parameter
Description
Auto-download status
Select Enabled.
Destination Type
Fixed to the backup gateway server directory.
Backup gateway
Select a backup gateway. DBS uses this gateway to connect to your server.
ImportantThis feature is in beta with potential performance bottlenecks. Do not use the same backup gateway for multiple backup schedules.
Destination Location
Select a destination type and specify the storage path:
-
Server directory
-
FTP path
-
NAS directory
-
MinIO path
Full data format
Uses the system default format. Not configurable.
NoteFull and incremental backup set data formats are covered in the feature documentation.
Incremental data format
Uses the native format by default. Not configurable.
-
-
After completing the configuration, click OK.
-
Using your operations account, go to the Configure Task page and click Backup set download in the navigation pane to view the download progress.
Modify a backup lifecycle
-
Log on to Data Management (DMS) 5.0.
-
In the top navigation bar, choose Security and disaster recovery (DBS) > Data Disaster Recovery (DBS) > Backup Plan.
NoteIf you use the DMS console in simple mode, move the pointer over the
icon in the upper-left corner of the DMS console and choose All Features > Security and disaster recovery (DBS) > Data Disaster Recovery (DBS) > Backup Plan. -
In the Actions column of the target backup schedule, click Manage to open the Configure Task page.
-
In the Lifecycle information section, click Set Lifecycle.
-
Set the retention period for full or incremental backups, and then click Save.
Important-
Retention period: 7–3,650 days. Expired backup sets are automatically deleted and cannot be restored.
-
If incremental backup is not enabled, the console shows only full backup lifecycle settings. Enable or disable incremental log backup.
-
Set minimum retention policy
-
Set the backup set lifecycle when configuring the backup schedule, or modify it later. Methods:
-
Console: Manage a backup schedule and Modify a backup lifecycle.
-
-
Storage costs depend on the backup destination. A user-owned OSS bucket incurs no DBS storage fees. DBS built-in storage is billed by data volume and duration. Differences between DBS built-in storage and user-owned OSS buckets. Storage billing.
NoteFor large data volumes, purchase a DBS storage package to deduct storage fees. Use a storage package.
-
You can also manually delete backup sets to reduce storage costs.
Disaster recovery for an ECS-hosted database
-
Create a backup schedule and set the Backup Method to Logical Backup.
-
Configure the backup schedule and set Database Location to ECS-hosted database.
Geo-redundant backup for RDS for MySQL
-
Apply for a public endpoint for the source RDS for MySQL instance.
-
Create a backup schedule. For a geo-redundant backup, you must purchase a backup schedule in a region that is different from the source region. Set the Backup Method to Logical Backup.
Geo-redundant backup for a self-managed database
-
Create a backup schedule and set the Backup Method to Logical Backup.
-
When you configure the backup schedule, set Database Location to User-Created Database with Public IP Address <IP Address:Port Number>.
If the User-Created Database with Public IP Address <IP Address:Port Number> option is unavailable, search for the DingTalk group ID 35585947 or submit a ticket to request access.
Back up a private database with DG
-
Create a backup schedule and set the backup method to Logical backup.
-
Configure the backup schedule, and set Database Location to Self-managed database without public IP:Port (through Database Gateway DG).
Back up an on-premises database with Express Connect
-
Create a backup schedule and set the Backup Method to Logical backup.
-
Connect your on-premises IDC to Alibaba Cloud using an Express Connect circuit to establish a VPC-to-IDC network connection. Connect an on-premises IDC to a VPC over an Express Connect circuit.
-
On the client-side access device in your IDC, add a static route pointing to the DBS CIDR block:
ip route <DBS CIDR block> {Alibaba Cloud-side interconnect IP}. DBS CIDR blocks are listed in DBS IP address CIDR blocks. -
Manage a backup schedule. Set Database Location to Self-managed database connected over Express Connect, a VPN Gateway, or Smart Access Gateway.
Back up a self-managed Redis database
-
Create a backup schedule and set the Backup Method to Logical backup.
Note-
When you purchase the schedule, set Source Database Type to Redis and Logical Backup to Logical backup.
-
Backup and restore granularity for Database Backup Service (DBS) with Redis databases: Supported database engines and features.
-
-
Configure the backup schedule and set Database Location to ECS-hosted database.
Cloud disaster recovery for a self-managed MySQL
Prerequisites
A complete logical backup is required.
-
Only logical backup schedules are supported. Physical backups do not support database-level or table-level recovery.
-
Logical backups for PolarDB-X support only backups of the entire instance. Therefore, database-level or table-level recovery is not supported.
Backup and restore
Logical backup and restore for cross-cloud or self-managed MySQL databases.
DBS IP address CIDR blocks
|
Region |
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 |
Finance Cloud server CIDR blocks
|
Finance Cloud region |
CIDR block |
|
China (Hangzhou) |
100.104.255.64/26 |
|
China (Shenzhen) |
100.104.194.128/26 |
|
China (Shanghai) |
100.104.45.64/26 |