Managing OCI Database with PostgreSQL Backups
Create, schedule, and restore from OCI Database with PostgreSQL backups.
Backups are a copy of the database data that's taken and stored remotely so that it can be used to restore the original if needed, such as after a data loss event. Backups can be created manually or automated through a management policy and copied and distributed to another region. You can use a backup that's been copied to a second region to provision a new database system if the primary database system is unavailable.
Automatic backups can be scheduled to be created daily, weekly, and monthly and have a retention period of up to 35 days before they're deleted by the system. When you create a backup manually, you can specify whether the backup is deleted on a specific date or deleted after a specified number of days.
Backup Size and Copy Order
A database system's first backup is a full backup, and all backups thereafter are incremental backups. Backups copied in sequential order, manually or automatically, retain their expected size. But if you copy backups out of order, an incremental backup can be sized as a full backup. In the following example, a database system has been backed up three times:
- Backup 1 (B1) is a 50 GB full backup
- Backup 2 (B2) is a 10 GB incremental backup
- Backup 3 (B3) is a 5 GB incremental backup
- Backup 4 (B4) is a 5 GB incremental backup
If you manually copy B3 before first copying B1 and then copying B2, the size of that B3 copy is 65 GB instead of 5 GB. Copying backups in the correct order saves on storage and networking costs.
We recommend scheduling automatic backups of the database system and enabling backup copies to guarantee sequencing.
Required IAM Policy
The following policy statements allow a group of administrators to manage OCI Database with PostgreSQL database backups:
Allow group <postgresql-admin-group> to read compartments in tenancy
Allow group <postgresql-admin-group> to manage postgres-backups in [ tenancy | compartment <compartment_name> | compartment id <compartment_OCID> ]
Allow group <postgresql-admin-group> to read postgres-db-systems in [ tenancy | compartment <compartment_name> | compartment id <compartment_OCID> ]
Allow group <postgresql-admin-group> to use tag-namespaces in tenancy
For more information, including the specific permissions needed to copy backups across regions, see OCI Database with PostgreSQL Policies.
Limitations and Considerations
Review the following limitations and considerations when working with database system backups:
- Backups created and copied automatically through a management policy have a maximum retention period of 35 days. Manually created or copied backups can be retained indefinitely.
- To copy a backup, the database system must use availability domain-specific data placement. You can't copy backups of database systems that use regional data placement.
- Backups in one region can be copied to any other regions to which the tenancy is subscribed. A backup can't be copied to the same region in which it was created.
- An existing backup must have an ACTIVE status to be copied to another region.
- Copying backups to another region results in associated networking costs. For more information, see Billing.
- Manually copying backups doesn't guarantee sequencing, which can lead to increased storage and networking costs. For more information, see Backup Size and Copy Order.