Data is a core asset for enterprises. As the business of enterprises grows, data increases exponentially. This requires business applications to be able to process data online and in real time. Database O&M personnel face great challenges in protecting the core data of enterprises because issues, such as accidental data deletion, system vulnerabilities and ransomware, hardware failures, and natural disasters, can cause data loss. Therefore, backup and restoration are important features of databases.
PolarDB supports the following backup modes:
Data backup: the progress of creating a backup set (snapshot) for the full data of a cluster at a specific point in time. A data backup process is a full backup process.
Physical log backup: the process of recording the new data after a backup set is created. A physical log backup process is a incremental backup process.
You can restore your PolarDB cluster or a specific table in your cluster to any point in time by using a full data backup set and the subsequent redo logs.
Billing rules
You can use the backup and restoration feature free of charge. However, backup files consume storage space. For more information about billing rules, see Backup storage beyond the free quota.
For more information about how to view your bills, see Bills.
If you select to retain backup sets for a long time when you manually unsubscribe or release your cluster, the backup sets are automatically moved to the cluster recycle bin. In this case, level-1 backup files automatically become level-2 backup files and you are charged. For more information, see Cluster recycle bin.
Data backup
PSL4 or PSL5
Level-1 backup
Level-1 backup files are created from Redirect-on-Write (ROW) snapshots. These snapshots are stored in the distributed file system of PolarDB. The system does not replicate data when it saves a data block to a snapshot. When a data block is modified, the system saves one of the previous versions of the data block to a snapshot and creates a new data block that is redirected by the original data block. Therefore, a backup process can be completed within a few seconds regardless of the size of your database storage.
The backup and restoration feature of PolarDB clusters use multi-threading parallel processing and other innovative technologies. This allows you to restore data from a backup set (snapshot) to a new cluster within 10 minutes (or 20 minutes if the hot standby cluster feature is enabled). The consumed time depends on factors such as the amount of data in the database.
View the size of level-1 backup files
By default, the level-1 backup feature is enabled, and you cannot disable this feature.
The retention period of level-1 backup files ranges from 3 days to 14 days.
Level-2 backup
Level-2 backup files are level-1 backup files that are compressed and then stored in on-premises storage. The level-2 backup feature is slower to restore than level-1 backup. However, the level-2 backup feature is more cost-effective than the level-1 backup feature.
After the level-2 backup feature is enabled, expired level-1 backup files are automatically stored as level-2 backup files.
Level-2 backup files can be stored in the same region as the PolarDB cluster or in a different region. For more information, see Single-region backup and cross-region backup.
View the size of level-2 backup files
If a level-1 backup file expires before the previous one is transferred to a level-2 backup file, the level-1 backup file is deleted and is not transferred to a level-2 backup file. For example, a PolarDB cluster generates a level-1 backup file at 01:00 every day and retains the backup file for 24 hours. Assume that the PolarDB cluster generates Level-1 Backup A at 01:00 on January 1 and Level-1 Backup B at 01:00 on January 2. Level-1 Backup A expires at 01:00 on January 2 and starts to be transferred to a level-2 backup file. However, Level-1 Backup A stores a large amount of data, and the transfer task is not completed by 01:00 on January 3. In this case, Level-1 Backup B is deleted after it expires at 01:00 on January 3 and is not transferred to a level-2 backup file.
By default, the level-2 backup feature is disabled.
The retention period of level -2 backup files ranges from 3 days to 7,300 days.
ESSDs
Level-1 backup files are backup files that are stored on your on-premises compute. Level-1 backup files are snapshots stored on a cluster that supports distributed storage. Level-1 backup files allow you to back up and restore data in a quick manner. However, level-1 backup files have high costs. If you retain level-1 backup files for an extended period of time, the write performance of the cluster may be degraded. We recommend that you retain the backup files for no more than two weeks. A free quota of storage space is provided for backup files. You may be charged additional fees for excess storage usage. You can modify the backup schedule to manage the size of the backup files.
By default, the level-1 backup feature is enabled, and you cannot disable this feature.
The retention period of level-1 backup files ranges from 3 days to 14 days.
View the size of level-1 backup files
Physical log backup
Features
The log backup feature allows you to create log backup files by uploading real-time redo logs to Object Storage Service (OSS) in parallel. Log backup files can be stored in the same region as the PolarDB cluster or in a different region. The log backup files are retained for 3 to 7,300 days. You can save the log backup files permanently by enabling the Permanently Retain Backups before Cluster Deletion feature.
NoteBy default, log backup files are stored in the same region as the PolarDB cluster. This backup storage method cannot be disabled.
Log backup helps consistent point-in-time recovery. Based on a full backup set (snapshot) and the redo logs generated after the backup set is created, you can perform point-in-time recovery (PITR) for a PolarDB cluster. Log backup can prevent data loss caused by user errors and ensure the security of data that is generated within a period of time. If you perform PITR, you must consider the amount of time that is required to query redo logs. Redo logs are queried at a rate of 1 GB every 20 seconds to 70 seconds. The total restoration duration is the sum of the time that is required to restore backup sets and the time that is required to query redo logs.
View the size of a backup set
The following figure shows that the total size of log backup files is the sum of the size of each log backup file.
Single-region backup and cross-region backup
Backup description
Backup type
Description
Enabled by default
Scenario
Benefit
Single-region backup
Backup files are stored in the same region as the PolarDB cluster but in a different zone.
Yes.
NoteThis backup storage method is enabled by default when you enable the level-2 backup feature.
Long-term archiving.
Allows you to reduce costs by dumping data at a low backup frequency.
Cross-region backup
Backup files are stored in a different region from the PolarDB cluster.
No. This backup storage method must be manually enabled.
Geo-redundancy and MLPS level 3.
Allows you to reduce recovery point objective (RPO). This backup storage method is suitable for private network environments that are encrypted and highly secure. You can reduce costs by dumping data at a low backup frequency.
NoteLow-frequency level-2 backup: The level-2 backup frequency is lower than the level-1 backup frequency.
Alibaba Cloud regions in which cross-region backup is supported
Source region
Destination region
Chinese mainland regions
Chinese mainland regions
US (Silicon Valley) and US (Virginia)
China (Hong Kong), Singapore, Indonesia (Jakarta), Japan (Tokyo), and Malaysia (Kuala Lumpur)
Germany (Frankfurt)
China (Hong Kong)
US (Silicon Valley) and US (Virginia)
Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), and Indonesia (Jakarta).
Germany (Frankfurt)
Chinese mainland regions
FAQ
For information about backup and restoration, see FAQ.