AnalyticDB for MySQL can restore data to avoid data loss caused by accidental changes. When you create a cluster, the data backup feature of AnalyticDB for MySQL is automatically enabled to back up cluster data. You can view the backup sets of a cluster or modify the backup settings in the AnalyticDB for MySQL console.
DDL statements cannot be executed on a cluster within about 10 minutes after a full backup of the cluster starts.
- Log on to the AnalyticDB for MySQL console by your Alibaba Cloud account.
- In the upper-left corner of the page, select the region where clusters reside.
- In the left-side navigation pane, click Clusters.
- On the V3.0 Clusters tab, click the target Cluster ID.
- In the left-side navigation pane, click Backup and Restoration.
- On the Backup and Restoration page, perform the following operations:
- View backup setsOn the Data Backup tab, you can view backup set details of a cluster, such as the backup start time, backup end time, and backup set size.Note The Backup Size values displayed in the AnalyticDB for MySQL console vary based on the mode of the current cluster.
- Elastic Mode: The Backup Size values displayed in the console are the actual sizes of the backup sets in the cluster.
- Reserved Mode: The Backup Size values displayed in the console are larger than the actual sizes of the backup sets in the cluster.
For example, the preceding figure is a screenshot of backup sets in an Elastic Mode cluster.
1654.76 Mindicates the actual size of a backup set generated by the elastic mode cluster between 13:00 to 13:14 on July 26, 2021 (UTC+8).
- Modify backup settings
- Click the Backup Settings tab.
- Click Modify Backup Settings. In the Backup Settings panel, configure the parameters described in the following table.
Parameter Description Data Backup Cycle The interval at which automatic data backup is performed.Note Backup must be performed at least twice a week to prevent data loss. Backup Start Time The start time of automatic data backup.Note The amount of time it takes to back up data is determined by the amount of data to back up. We recommend that you set the backup start time to a period of time during off-peak hours. Full Backup Retention The number of days for which full backup files are retained.
If you perform full backup, snapshots of full data in a cluster are compressed and stored in other offline storage media. For metadata consistency on a distributed cluster, DDL statements cannot be executed on the cluster within about 10 minutes after a full backup of the cluster starts. Full restoration from backup sets is performed by cloning clusters. Backup sets are downloaded to restore data to a new cluster. For more information, see How backup works.Note
- By default, full backup is enabled, and backup files are retained for seven days.
- Backups can be retained for 7 to 730 days.
Log Backup Retention The number of days for which log backup files are retained.
If you perform log backup, redo logs are uploaded in parallel by using multiple nodes in a cluster to Object Storage Service (OSS) to store real-time logs. A full backup and subsequent redo logs generated within a period of time can be used to restore data at a point in time to a new cluster. For more information, see How backup works.Note By default, log backup is enabled, and backup files are retained for seven days. You cannot modify the retention period.
- View backup sets
What to do next
You can clone the backup data of an AnalyticDB for MySQL cluster to a new cluster by using existing backup sets. For more information, see Clone a cluster.