Database Backups
Learn more about Aptible’s database backup solution with automatic backups, default encryption, with flexible customization
Overview
Database Backups are essential because they provide a way to recover important data in case of disasters or data loss. They also provide a historical record of changes to data, which can be required for auditing and compliance purposes.
Aptible provides Automatic Backups of your Databases every 24 hours, along with a range of other backup options. All Backups are compressed and encrypted for maximum security and efficiency. Additionally, all Backups are automatically stored across multiple Availability Zones for high-availability.
Automatic Backups
By default, Aptible provides automatic backups of all Databases. The retention period for Automated Backups is determined by the Backup Retention Policy for the Environment in which the Database resides. The configuration options are as follows:
DAILY BACKUPS RETAINED
- Number of daily backups retainedMONTHLY BACKUPS RETAINED
- Number of monthly backups retained (the last backup of each month)YEARLY BACKUPS RETAINED
- Number of yearly backups retained (the last backup of each year)COPY BACKUPS TO ANOTHER REGION: TRUE/FALSE
- When enabled, Aptible will copy all the backups within that Environment to another region. See: Cross-region Copy BackupsKEEP FINAL BACKUP: TRUE/FALSE
- When enabled, Aptible will retain the last backup of a Database after your deprovision it. See: Final Backups
Recommended Backup Retention Policies
Production environments: Daily: 14-30, Monthly: 12, Yearly: 5, Copy backups to another region: TRUE (depending on DR needs), Keep final backups: TRUE
Non-production environments: Daily: 1-14, Monthly: 0, Yearly: 0, Copy backups to another region: FALSE, Keep final backups: FALSE
Manual Backups
Manual Backups can be created anytime and are retained indefinitely (even after the Database is deprovisioned).
Cross-region Copy Backups
When COPY BACKUPS TO ANOTHER REGION
is enabled on an Environment, Aptible will copy all the backups within that Environment to another region. For example, if your Stack is in the US East Coast, then Backups will be copied to the US West Coast.
The exact mapping of Cross-region Copy Backups is as follows:
Originating region | Destination region(s) |
---|---|
us-east-1 | us-west-1, us-west-2 |
us-east-2 | us-west-1, us-west-2 |
us-west-1 | us-east-1 |
us-west-2 | us-east-1 |
sa-east-1 | us-east-2 |
ca-central-1 | us-east-2 |
eu-west-1 | eu-central-1 |
eu-west-2 | eu-central-1 |
eu-west-3 | eu-central-1 |
eu-central-1 | eu-west-1 |
ap-northeast-1 | ap-northeast-2 |
ap-northeast-2 | ap-northeast-1 |
ap-southeast-1 | ap-northeast-2, ap-southeast-2 |
ap-southeast-2 | ap-southeast-1 |
ap-south-1 | ap-southeast-2 |
Final Backups
When KEEP FINAL BACKUP
is enabled on an Environment, Aptible will retain the last backup of a Database after your deprovision it. Final Backups are kept indefinitely as long as the Environment has this setting enabled.
Managing Backup Retention Policy
The retention period for Automated Backups is determined by the Backup Retention Policy for the Environment in which the Database resides.
The default Backup Retention Policy for an Environment is 30 Automatic Daily Backups, 12 Monthly Backups, 6 Yearly Backups, Keep Final Backup: Enabled, Cross-region Copy Backup: Disabled.
Backup Retention Policies can be modified using one of these methods:
- Within the Aptible Dashboard:
- Select the desired Environment
- Select the Backups tab
- Using the
aptible backup_retention_policy:set
CLI command. - Using the Aptible Terraform Provider
Excluding a Database from new Automatic Backups
A Database can be excluded from the backup retention policy preventing new Automatic Backups from being taken. This can only be done within the Aptible Dashboard from the Database Settings.
Once this is selected, there will be no new automatic backups taken of this database, but please note: this does not automatically delete previously taken backups. Purging the previously taken backups can be achieved in the following ways:
- Using the
aptible backup:list DB_HANDLE
to provide input into theaptible backup:purge BACKUP_ID
command - Setting the output format to JSON, like so:
Purging Backups
Automatic Backups, Final Backups, and Cross-region Copy Backups not matching the Backup Retention Policy are automatically and permanently deleted. This purging process can take up to 1 hour.
All Backups can be manually and individually deleted.
Restoring from a Backup
Restoring a Backup creates a new Database from the backed-up data. It does not replace or modify the Database the Backup was initially created from. All new Databases are created with General Purpose Container Profile, which is the default Container Profile.
Encryption
Aptible provides built-in, automatic Database Encryption. The encryption key and algorithm used for Database Encryption are automatically applied to all Backups of a given Database.
FAQ
Was this page helpful?