This topic provides answers to frequently asked questions about the backup and restoration features of PolarDB for PostgreSQL.
Data backup FAQ
- Is the total size of level-1 backups (snapshots) equal to the sum of the sizes of
all level-1 backups (snapshots)?
No, the total size of level-1 backups (snapshots) is not equal to the sum of the sizes of all level-1 backups (snapshots). The total size of level-1 backups (snapshots) is displayed in part ①, as shown in the following figure.
- Why is the total size of level-1 backups smaller than the sum of the sizes of all
The size of level-1 backups in PolarDB is measured in two forms: the logical size of backups and the total physical storage of backups. PolarDB uses snapshot chains to store level-1 backups. Only one record is generated for each data block. Therefore, the total physical storage of all level-1 backups is smaller than the total logical size of all level-1 backups. In some cases, the total physical storage of all level-1 backups is smaller than the logical size of a single backup.
- How am I charged for backups in PolarDB?
You are charged for storage space of level-1, level-2, and log backups. By default, the level-1 backup and log backup features are enabled, and a free storage quota is provided. By default, the level-2 backup feature is disabled.
- How are the fees of level-1 backups calculated?
The fee is calculated based on the following formula: Storage fee per hour = (Total size of level-1 backups - Used database storage space × 50%) × Price per hour. For example, in a region within Chinese mainland, the total size of level-1 backups of a PolarDB database is 700 GB, and the used database storage space is 1,000 GB. Then, the storage fee per hour is calculated based on the following formula: [700 GB - 500 GB] × USD 0.000464/GB = USD 0.0928.
- Can I use a storage plan to offset the storage fees of backups?
Yes, you can purchase a storage plan to offset the storage space used by all PolarDB clusters within your account. The remaining capacity of the storage plan is automatically used to offset the storage space that exceeds the free quota for level-1 backups at a ratio of 1:1.6 until the storage plan is exhausted. If the remaining capacity of the storage plan is insufficient to offset the storage space of level-1 backups, you are charged for additional storage space on a pay-as-you-go basis. For more information, see Storage plans.
- Are level-1 backups the only type of backup that can be manually created?
- How long are manually created backups retained?
The retention period of manually created backups is specified by the Level-1 Backup parameter in the Data Backup Retention Period section.
- How do I view the size of a level-2 backup?
You can view the size of a level-2 backup on the Backups tab in the console.
Data restoration FAQ
- How can I restore data that was deleted or modified by accident?
You can choose different methods to restore data based on your business scenario and database engine version. For more information, see Restoration method 1: Restore data to a specific point in time and Restoration method 2: Restore data from a backup set (snapshot).
- Can I customize the names of restored tables?
- If my cluster does not have a data backup, can I restore the data to a previous point
No. To restore data to a previous point in time, you must restore the data of a full backup that was created before the specified point in time. Then, you must restore the data generated after the backup that was created and before the specified point in time based on the physical logs.