This topic describes how to enable PolarDB for Oracle to automatically create backups at specified intervals or manually create backups to prevent data loss in a timely manner. PolarDB for Oracle also allows you to retain backups of a cluster when you delete the cluster.
Data backups
Data backups are divided into level-1 backups and level-2 backups by storage location.
The location where backup sets are stored | Enabled by default? | Retention period | Characteristics | How to view the size of a backup set |
---|---|---|---|---|
Level-1 backups | Yes | 3–14 days |
Warning By default, the level-1 backup feature is enabled. To disable the feature, you need
to submit a ticket. We recommend that you keep the level-1 backup feature enabled if possible to reduce
the risk of data loss. If the feature is disabled, data loss may occur, for example,
due to user errors.
|
The following figure shows the total physical storage of level-1 backups. ![]() Note The total size of level-1 backups of a PolarDB cluster is the sum of the dedicated physical storage occupied by all level-1 backups,
as shown in part ①. It is not the sum of the logical data sizes of all level-1 backups,
as shown in part ②. The data of the PolarDB cluster and multiple level-1 backups (snapshots) can be stored in the same physical
data block that is billed only once. For more information, see FAQ.
|
Level-2 backups | No |
|
Note If a level-1 backup expires before the previous one is transferred to a level-2 backup,
the level-1 backup is deleted and is not transferred to a level-2 backup. For example,
a PolarDB cluster creates level-1 backups at 01:00 every day and retains the backups for 24
hours. If the PolarDB cluster creates Level-1 Backup A at 01:00 on January 1 and creates 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. 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.
|
The following figure shows the total size of level-2 backups. The total size of level-2
backups is the sum of the data sizes of all level-2 backups. ![]() |
Pricing
The backup and restoration features of PolarDB are free of charge. Only storage fees are charged. In PolarDB, fees are calculated based on the storage consumed by backups (data and logs) and the retention period of these backups.
Region | Level-1 backup | Level-2 backup | Log backup |
---|---|---|---|
Mainland China | USD 0.000464/GB/hour | USD 0.0000325/GB/hour | USD 0.0000325/GB/hour |
Hong Kong (China) and regions outside China | USD 0.000650/GB/hour | USD 0.0000455/GB/hour | USD 0.0000455/GB/hour |
Billing method
Backup type | Free quota | Billing method |
---|---|---|
Level-1 backup | Database storage usage × 50%
You can view the database storage usage of a cluster on the Overview page of the cluster in the PolarDB console. |
Storage fee per hour = (Total physical storage of level-1 backups - Free quota) ×
Unit price per hour
For example, if the total physical storage of level-1 backups is 700 GB and the database storage usage is 1,000 GB, the storage fee per hour is USD 0.0928. The fee is calculated based on the following formula: [700 GB - (1,000 GB × 50%)] × USD 0.000464/GB/hour = USD 0.0928/hour. |
Level-2 backup | None | Storage fee per hour = Total physical storage of level-2 backups × Unit price per
hour
For example, if the total physical storage of level-2 backups is 1,000 GB, the storage fee per hour is USD 0.0325. The fee is calculated based on the following formula: 1,000 GB × USD 0.0000325/GB/hour = USD 0.0325/hour. |
Log backup | 100GB | Storage fee per hour = (Total physical storage of log backups - 100 GB) × Unit price
per hour
For example, if the total physical storage of log backups is 1,000 GB, the storage fee per hour is USD 0.02925. The fee is calculated based on the following formula: (1,000 GB - 100 GB) × USD 0.0000325/GB/hour = USD 0.02925/hour. |
Backup methods
Backup methods | Description |
---|---|
Automatic system backup |
Note To prevent data loss, automatic backup must be performed at least twice a week.
|
Manual backup |
|
Backup method | Description | |
---|---|---|
Automatic system backup | Standard backup |
Note To prevent data loss, automatic backup must be performed at least twice a week.
|
Enhanced backup | PolarDB allows you to create backups every 2, 3, or 4 hours for the data that is generated
within the last 24 hours.
After you enable enhanced backup, all the backups are retained for 24 hours. Backups are automatically deleted when the retention period expires. However, the system permanently retains the first backup that is created after 00:00 every day. For example, if you specify a backup frequency of every 4 hours at 08:00 on March 1, the system automatically creates the first backup within 4 hours from 08:00 to 12:00 on March 1. Then, the system continues to create a backup every 4 hours. If the current time is 16:00 on March 4, the system retains the following backups:
![]() Then, after 4 hours or at 20:00 on March 4, the system retains the following backups:
![]() |
|
Manual backup |
|
Configure the automatic backup feature
Manually create a backup
Restore data
For more information, see Restore data.
Related API operations
API | Description |
---|---|
CreateBackup | Creates a full backup for a specified PolarDB cluster. |
DescribeBackups | Queries the backup information about a specified PolarDB cluster. |
DeleteBackup | Deletes the backups of a specified PolarDB cluster. |
DescribeBackupPolicy | Queries the automatic backup policy of a specified PolarDB cluster. |
ModifyBackupPolicy | Modifies the automatic backup policy of a specified PolarDB cluster. |