DBS offers features such as full backup, incremental backup, and data restore. You need to create a backup schedule before you can configure these features.
You can create a backup schedule on either of the following pages:
After you create a DBS instance, a backup schedule that is in the Not Configured state will be listed on the Backup Schedules page of the DBS console. To configure the backup schedule, follow these steps:
- Configure the backup source and destination.
- Configure backup objects.
- Configure the backup time.
- Configure the backup lifecycle.
- Perform a precheck.
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 databases.
- User-created databases connected to Alibaba Cloud through Express Connect, VPN Gateway, or Smart Access Gateway.
- PolarDB databases.
For more information about database types, environments, and versions supported by DBS, see Functionality matrix.
For more information about database permissions required for database backup, see Database permissions.
A backup gateway is a must for physical backup. For more information, see Add a backup gateway.
You may have multiple databases in a database instance. You can back up the entire database instance, a specific database, or several tables.
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.
You can also configure incremental backups. After you have enabled incremental backup, you can restore the database to a time accurate to the second. Incremental backups generate more backup data and involve higher costs.
DBS allows you to manage the lifecycle of backup sets to reduce storage costs. 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. You can configure similar policies for incremental backups. For more information, see Configure the backup lifecycle.
After you have configured the backup schedule, you can precheck the configurations, database connectivity, and database logging settings. If the precheck is successful, the backup schedule will take effect immediately.
After configuring the backup schedule, you may want to view it later on. You can go to the DBS console to view details about this schedule.
Step 1: Create SSL certificates and private keys
|MySQL versions earlier than 5.7||Use OpenSSL.|
|MySQL 5.7 and later versions||Run the /bin/mysql_ssl_rsa_setup command.|
For more information about how to use OpenSSL to create SSL certificates and private keys, see Creating SSL and RSA Certificates and Keys using MySQL.
For more information about how to run the mysql_ssl_rsa_setup command to create SSL certificates and private keys, see mysql_ssl_rsa_setup - Create SSL/RSA Files.
For more information about how to enable SSL encryption for ApsaraDB RDS for MySQL, see Set SSL encryption.
Step 2: Select SSL certificates and private keys
|ca.pem||Self-signed root CA certificate|
|ca-key.pem||CA private key|
|server-key.pem||Server private key|
|client-key.pem||Client private key|
Step 3: Upload SSL certificates and private keys
When you configure the backup schedule, select SSL-encrypted for SSL Encryption, and upload your SSL certificates and private keys.
- Root CA certificate
- Client certificate
- Client private key