Postgres backups ΒΆ
A backup is a self-contained copy of a Postgres database, kept in your team's disaster-recovery bucket for a retention period you choose. It can be restored into a new database, even after the source database is deleted.
For steps, see Back up and restore Postgres.
Backups and the recovery window ΒΆ
| Point-in-time recovery window | Backup | |
|---|---|---|
| Restores to | Any moment within the window | The moment the backup was taken |
| Retention | 2 to 30 days, default 2 | 1 to 730 days, default 30 |
| Created | Automatically | When you request it |
| Deleted with the database | Yes | No |
| Restore with | Cloning | Restore from backup |
Settings ΒΆ
| Setting | Rules |
|---|---|
| Name | Unique within the team and environment. Lowercase letters, numbers, hyphens or dots, starting and ending with a letter or number |
| Retention | 1 to 730 whole days, counted from completion. Default 30 |
The retention of a backup cannot be changed after it is created.
Status ΒΆ
| Status | Meaning |
|---|---|
| preparing | The backup is waiting to start |
| running | The database is being backed up, copied and verified in the disaster-recovery bucket |
| completed | The backup is verified and can be restored until it expires |
| failed | The backup cannot be used. The reason is shown with the status |
The backup list also shows the source database, PostgreSQL version and disk size, the size of the backup, when it was created, and when it expires.
When a backup expires, it is deleted automatically. Expiry and deletion are postponed while a restore from the backup is in progress.
Restored database ΒΆ
A restore creates a new database in the same team and environment as the backup. The name must not be in use. The database starts from the moment the backup was taken.
| Setting | Restored database |
|---|---|
| PostgreSQL major version | The backup's version. Cannot be changed |
| Extensions | The backup's extensions. You can add more, but not remove any |
| Disk size | The backup's disk size by default. Can be increased, but not decreased |
| High availability | Off by default |
| CPU and memory | Platform defaults, unless you set them |
| Recovery window | Default 2 days, unless you set it |
The restore runs asynchronously. It is complete when the new database has taken its own first backup and no longer depends on the backup. The source backup can still expire or be deleted afterwards without affecting the restored database.
If the restore fails, the database page shows the reason. A failed restore is not a usable database: delete it and try again with a new database.
Permissions ΒΆ
Team members and team owners can list, create, restore and delete backups.
Cost ΒΆ
Backups are stored in a bucket in your team's project, and the storage is billed to your team. The cost depends on the size of each backup and how long it is kept.