All Products
Search
Document Center

Use DBS to back up a PolarDB MySQL instance

Last Updated: Aug 25, 2020

DBS can meet your requirements of restoring single tables, backing up ApsaraDB PolarDB for MySQL instances from one region to another, and archiving backup data for a long term. DBS performs full backups on a PolarDB database based on the PolarDB cluster endpoint. This significantly reduces the negative impact of backup operations on the performance of the database. DBS also supports backing up transaction logs based on the primary endpoint. This guarantees real-time backup and reduces the recovery point objective (RPO) to seconds.

Features

Feature Description Details
Binlog backup DBS uses the incremental log streaming technology to retrieve binlogs in real time. Supports user download.
SQL file backup DBS uses the logical backup technology to store backup data in SQL or CSV files. Supports user download.
Remote backup DBS supports backing up a PolarDB instance to an OSS bucket in the destination region, and restoring it to a PolarDB instance in the destination region, source region, or any other regions. View details
Long-term archiving DBS supports retaining backup files for up to five years, after which the backup set will be automatically transferred to Archive storage. View details
Fine-grained backup DBS supports backing up a single table, a single database, multiple databases, or an entire PolarDB instance. View details
Backup speed limit DBS allows you to limit the backup speed to significantly reduce the negative impact of backup operations on the performance of the database. View details
Single-table restore DBS supports single-table restore without the need to restore the entire PolarDB instance. This reduces the time required for data restore. View details

Procedure

This topic describes how to use DBS to back up a PolarDB instance in three parts.

1. Activate a DBS backup schedule

2. Back up a PolarDB instance

3. Restore a PolarDB instance

1. Activate a DBS backup schedule

(1) Create a DBS backup schedule

Go to the DBS purchase page, select MySQL as the database type, and purchase a DBS instance.

  • DBS region: Make sure that the region of the DBS instance is the same as that of the destination OSS bucket.
  • Database type: Select MySQL, which is the database engine of PolarDB.
  • Specification: We recommend that corporate users select medium and individual users select small. The specification can be upgraded to large as needed later on.
  • Backup method: Currently, only logical backup is supported for PolarDB instances.

1.1

 

(2) Configure the DBS backup schedule

Go to the DBS console. In the left-side navigation pane, click Backup Schedules. On the Backup Schedules page that appears, click Configure Backup Schedule in the Actions column of the created backup schedule.

1.2

 

(3) Configure the backup source

Database Location: Select PolarDB Instance.

1.3

 

DBS supports backing up and restoring databases in the following environments:

  • User-created databases connected to Alibaba Cloud through IP addresses and port numbers
  • User-created databases hosted on ECS instances
  • ApsaraDB for RDS instances
  • User-created databases connected to Alibaba Cloud through Express Connect, VPN Gateway, or Smart Access Gateway
  • PolarDB instances

1.4

 

(4) Configure the backup destination

The backup destination is an OSS bucket. DBS automatically generates the name of the OSS bucket. You can also enter a custom OSS bucket name.

1.4

 

(5) Configure backup objects

DBS supports backing up a single table, a single database, multiple databases, or an entire PolarDB instance.

1.5

 

(6) Configure the backup time

DBS supports periodic backup and one-time backup. You can configure when to back up your database. You can choose to perform backups weekly. You can also specify the time point for backup. For example, you can perform a full backup at off-peak hours, such as 03:00. For databases that do not support incremental backup, the real-time transaction log backup feature is disabled, and the status cannot be changed.

 To reduce the negative impact of backup operations on the performance of the database, DBS allows you to set the maximum number of concurrent threads for full backup to limit the backup speed.

  • Maximum Concurrent Threads for Full Data Backup: A smaller value indicates a lower backup speed and a smaller impact on the performance of the source database.

1.7

 

(7) Configure the backup lifecycle

DBS allows you to manage the lifecycle of backup sets to reduce storage costs. Backup sets can be retained for up to five years, that is, 1,825 days. You can configure transfer and deletion policies for all backup sets stored in OSS. In the following example, the maximum retention period of a full backup set is 730 days. The backup set will be deleted after 730 days have passed. A newly created backup set is first stored in OSS Standard storage for 180 days, and then transferred to OSS Infrequent Access storage. After another 365 days, the backup set is transferred to OSS Archive storage.

1.8

 

2. Back up a PolarDB instance

(1) Full backup

This page displays information about all full backup tasks associated to the backup schedule.

2.1

 

(2) Transaction log backup

This page displays information about all transaction log backup tasks associated to the backup schedule.

2.2

 

3. Restore a PolarDB instance

(1) Select a restore time point

After transaction log backup is enabled, DBS allows you to restore your PolarDB instance to any point in time.

3.1

(2) Configure the restore destination database

Database Location: Select PolarDB Instance.

3.2

 

(3) Configure objects to restore

DBS enables you to only restore the selected table instead of the entire database instance. This significantly reduces the data to be restored and the recovery time objective (RTO).

3.3

 

(4) Start the restore task

3.4