Data is a core asset for enterprises. As business develops, enterprise data grows at scale and explosively. Business applications require real-time and online processing. For database O&M personnel, protecting enterprise core data is increasingly challenging. For example, accidental data deletion, system vulnerabilities and ransomware, hardware failures, and even natural disasters can all cause data loss. Therefore, backup and restoration are critical database features.
PolarDB supports data backups and physical log backups:
-
Data backup: Creates a backup set (snapshot) of a cluster's complete data at a specific point in time. This is a full backup.
-
Physical log backup: Records the incremental data generated after a backup set is created. This is an incremental backup.
-
PolarDB cluster recovery restores data to the current cluster by using a backup set (snapshot).
-
PolarDB database or table recovery creates a new database or table in the current cluster to restore the data.
A full data backup combined with subsequent redo log backups enables point-in-time restoration of an entire PolarDB cluster or specific databases and tables.
Billing
-
The backup and restoration features are free to use, but backup files consume storage space. For specific billing rules, see Backup storage (beyond free quota).
-
For more information about how to view your bills, see Bills.
If you choose to retain backup sets for long-term preservation when you manually unsubscribe from or release your cluster, the backup sets are automatically moved to the cluster recycle bin. After entering the cluster recycle bin, for clusters with PSL4/PSL5 storage type, level-1 backups are automatically converted to level-2 backups; for clusters with ESSD cloud disk storage type, data backups are retained in the cluster recycle bin. A small fee is charged for backups. For more information, see Cluster recycle bin.
Data backup
PSL4/PSL5
Level-1 backups
Level-1 backups use redirect-on-write (ROW) snapshots and are stored directly in the PolarDB distributed storage system. No data is copied during backup. When a block is modified, the system retains the original version for the snapshot and redirects to a new block, enabling backups to complete in seconds regardless of database size.
PolarDB restores a cluster from a snapshot in about 10 minutes using multi-threaded parallel processing and other technical innovations. Recovery time doubles if a hot standby cluster is enabled. The actual time depends on factors such as data volume.
View level-1 backup size
-
Level-1 backup is enabled by default and cannot be disabled.
-
The retention period for level-1 backups is 3 to 14 days.
Level-2 backups
-
A level-2 backup is a compressed copy of a level-1 backup stored on offline storage media. It costs less but restores data at a slower speed.
-
After you enable level-2 backup, level-1 backups that exceed their specified retention period are automatically converted to level-2 backups.
-
Level-2 backups of Enterprise Edition clusters support both same-region and cross-region backups. Standard Edition clusters use same-region backup by default. For more information, see Same-region and cross-region backups.
-
Level-2 backups support the sparse backup feature. You can set the retention period for backup sets on a weekly, monthly, or yearly basis. This allows you to retain one backup set over a long interval, reducing the number of historical backup sets. This helps minimize costs while meeting compliance requirements. For more information, see Advanced backup settings.
View level-2 backup size
-
Level-2 backup is disabled by default.
-
The retention period for level-2 backups is 30 to 7,300 days.
-
If a level-1 backup fails to complete conversion to level-2 before the next level-1 backup starts conversion, the next level-1 backup is deleted directly instead of being converted to level-2. For example, if your PolarDB cluster is configured to create a level-1 backup daily at 01:00 with a 24-hour retention period, PolarDB creates level-1 backup A at 01:00 on January 1 and level-1 backup B at 01:00 on January 2. Backup A expires at 01:00 on January 2 and starts conversion to level-2. If the conversion is still in progress at 01:00 on January 3 because the backup file is large, backup B is deleted directly at 01:00 on January 3 instead of being converted to level-2.
ESSD cloud disk
Backup files stored locally are called level-1 backups. Level-1 backups are snapshots stored on the distributed storage cluster, providing the fastest backup and recovery speed at higher cost. Long-term retention may slightly affect database write performance, so we recommend keeping retention under two weeks. A free backup storage quota is provided; excess usage may incur additional charges. You can adjust the backup cycle to control backup capacity.
-
Level-1 backup is enabled by default and cannot be disabled.
-
The retention period for level-1 backups is 3 to 14 days.
View level-1 backup size
Physical log backup
Log backups are created by uploading redo logs to OSS in parallel and in real time. Log backups support same-region backup and cross-region backup, with a minimum retention period of 3 days and a maximum of 7,300 days. You can also enable the Long-term Retain Backups before Cluster Deletion feature for long-term storage.
Log backups enable point-in-time recovery (PITR). A full data backup (snapshot) combined with subsequent log backups restores a PolarDB cluster to any point in time (PITR), protecting recent data and preventing data loss from accidental operations. Redo log replay speed is approximately 20 to 70 seconds per GB. Total recovery time equals the backup set (snapshot) restoration time plus the redo log replay time.
Same-region log backup is enabled by default and cannot be disabled.
View backup size
The log backup size is as follows. The total log backup size is the sum of all individual log backup files.
Risk description
When the redo log generation rate of a PolarDB for MySQL cluster reaches 35 MB/s to 50 MB/s, redo logs may accumulate. This can increase your backup storage costs.
Backup data protection
-
Tamper-proofing:
-
In PolarDB for MySQL, data backups are classified into level-1 and level-2 backups by storage location. Level-1 backups are stored as snapshots in the PolarDB distributed storage system, while level-2 backups and log backups are stored in OSS. Both storage methods used internally by the backup system provide WORM (Write Once Read Many) immutability.
-
-
Protection against malicious or accidental deletion:
-
Manual deletion: You can only delete data from manual backups. You cannot delete data from automatic backups.
-
Automatic deletion on expiration: When automatic backup data exceeds the configured retention period, the system automatically deletes it. However, the automatic backup feature cannot be disabled. Per the backup policy settings, the minimum retention period is 3 days (default: 7 days) with at least 2 backups per week. Therefore, automatic backup full data and log data can never be fully deleted.
-
Same-region and cross-region backups
-
Backup description
Backup type
Description
Enabled by default
Use cases
Benefits
Same-region backup
Backups are stored in a different availability zone within the same region.
Yes.
NoteWhen you enable level-2 backup, same-region backup is enabled by default.
Long-term archiving.
Set a lower backup frequency for transfers as needed to achieve lower costs.
Cross-region backup
Backups are stored in a region other than the current region.
ImportantSupported only for PolarDB MySQL Enterprise Edition.
No. You must enable it manually.
Geo-redundant backup and MLPS Level 3 compliance.
Low RPO, suitable for secure non-public network environments. Set lower transfer frequency as needed to achieve lower costs.
NoteLow-frequency level-2 backup: the backup cycle for level-2 backups is set to a lower frequency than that of level-1 backups.
-
Supported regions for cross-region backup
Source region
Destination region
Chinese mainland
Chinese mainland
US (Silicon Valley), US (Virginia)
China (Hong Kong)
Singapore, Indonesia (Jakarta), Japan (Tokyo), Malaysia (Kuala Lumpur)
Germany (Frankfurt)
China (Hong Kong)
Chinese mainland
US (Silicon Valley), US (Virginia)
Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta)
Germany (Frankfurt)
Japan (Tokyo)
Chinese mainland
US (Silicon Valley), US (Virginia)
China (Hong Kong)
Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta)
Germany (Frankfurt)
US (Silicon Valley)
Chinese mainland
US (Virginia)
China (Hong Kong)
Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta)
Germany (Frankfurt)
US (Virginia)
Chinese mainland
US (Silicon Valley)
China (Hong Kong)
Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta)
Germany (Frankfurt)
Singapore
Chinese mainland
US (Silicon Valley), US (Virginia)
China (Hong Kong)
Malaysia (Kuala Lumpur), Indonesia (Jakarta)
Germany (Frankfurt)
Malaysia (Kuala Lumpur)
Chinese mainland
US (Silicon Valley), US (Virginia)
China (Hong Kong)
Singapore, Indonesia (Jakarta), Japan (Tokyo)
Germany (Frankfurt)
Indonesia (Jakarta)
Chinese mainland
US (Silicon Valley), US (Virginia)
China (Hong Kong)
Singapore, Japan (Tokyo), Malaysia (Kuala Lumpur)
Germany (Frankfurt)
Germany (Frankfurt)
Chinese mainland
US (Silicon Valley), US (Virginia)
China (Hong Kong)
Singapore, Indonesia (Jakarta), Japan (Tokyo), Malaysia (Kuala Lumpur)
China East 1 (Hangzhou) Finance Cloud
China East 2 (Shanghai) Finance Cloud, China South 1 (Shenzhen) Finance Cloud
China East 2 (Shanghai) Finance Cloud
China East 1 (Hangzhou) Finance Cloud, China South 1 (Shenzhen) Finance Cloud
China South 1 (Shenzhen) Finance Cloud
China East 1 (Hangzhou) Finance Cloud, China East 2 (Shanghai) Finance Cloud
FAQ
For common questions about backup and recovery, see FAQ.