Aptible PaaS logoDocs

Database Backups

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.

Types of Database Backups

Automatic Daily and Monthly Backups

🏳️Monthly Automatic Backups are only available on the Enterprise Plan.

Aptible provides Daily and Monthly Automatic Backups. By default, Aptible will retain at least one daily Automatic Backup of your Databases. With your Backup Retention Policy, you can configure additional Daily and Monthly Automatic Backups to be retained. For Monthly Backups, Aptible will retain the last Automatic Backup of each month.

Automatic Backups can be viewed in two ways:

  • Using the aptible backup:list command
  • Within the Aptible Dashboard, by navigating to the Database > Backup tab

Manual Backups

Manual Backups can be created anytime and are retained indefinitely (even after the Database is deprovisioned). Users can create Manual Backups in two ways:

  • Using the aptible db:backup command
  • Within the Aptible Dashboard by navigating to the Database > “Backup Management” tab > “Create Backup”

Final Backups

 🏳️ Final Backups are only available on the Enterprise Plan.

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. We highly recommend enabling this setting for production Environments. 

Final Backups can be viewed in two ways:

  • Using the aptible backup:orphaned command
  • Within the Aptible Dashboard by navigating to the respective Environment > “Backup Management” tab > “Retained Backups of Deleted Databases”

Cross-region Copy Backups

 🏳️ Cross-region Copy Backups are only available on the Enterprise Plan.

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.

📘 Cross-region Copy Backups are useful for creating redundancy for disaster recovery purposes. To further improve your recovery time objective (RTO), it’s recommended to have a secondary Stack in the region of your Cross-region Copy Backups to enable quick restoration in the event of a regional outage.

The exact mapping of Cross-region Copy Backups is as follows:

Originating regionDestination region(s)
us-east-1us-west-1, us-west-2
us-east-2us-west-1, us-west-2
us-west-1us-east-1
us-west-2us-east-1
sa-east-1us-east-2
ca-central-1us-east-2
eu-west-1eu-central-1
eu-west-2eu-central-1
eu-west-3eu-central-1
eu-central-1eu-west-1
ap-northeast-1ap-northeast-2
ap-northeast-2ap-northeast-1
ap-southeast-1ap-northeast-2, ap-southeast-2
ap-southeast-2ap-southeast-1
ap-south-1ap-southeast-2
🔒 Aptible guarantees that data processing and storage occur only within the US for US Stacks and EU for EU Stacks.

Managing Database Backups

Backup Retention Policy for Automated Backups

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
  • MONTHLY BACKUPS RETAINED
  • COPY BACKUPS TO ANOTHER REGION: 
  • KEEP FINAL BACKUP

The default Backup Retention Policy for an Environment is determined by your plan:

  • Starter: 1 Automatic Daily Backup
  • Growth: 7 Automatic Daily Backups
  • Scale: 7 Automatic Daily Backups
  • Enterprise: 90 Automatic Daily Backups, 72 Monthly Backups, Keep Final Backup: Enabled, Cross-region Copy Backup: Enabled
💰 Cost Optimization Tip: Customizing your Backup Retention Policy a great for optimizing your Backup costs. For non-production Environments, consider reducing the Backup Retention Policy as much as possible.

Backup Retention Policies can be reviewed or modified within the Aptible Dashboard by

  • Selecting the respective Environment
  • Selecting the Backup Management tab

Backup Management tab in the Aptible Dashboard

Purging Backups

Automatic Backups, Final Backups, and Cross-region Copy Backups not matching the Backup Retention Policy are automatically and permanently purged. This purging process can take up to 1 hour.

All Backups can be manually and individually purged in the following ways:

  • Using the aptible backup:purge command
  • For Active Databases - Within the Aptible Dashboard by:
    • Navigating to the respective Environment in which your Database lives in
    • Selecting the respective Database
    • Selecting the Backups tab
    • Selecting Permanently remove this backup for the respective Backup
  • For deprovisioned Databases - Within the Aptible Dashboard by:
    • Navigating to the respective Environment in which your Database Backup lives in
    • Selecting the Backup Management tab
    • Selecting **Permanently remove this backup **for the respective Backup

Purging a Backup from the Aptible Dashboard

Restoring from a Backup

You can restore from a Backup in the following ways:

  • Using the aptible backup:restore command
  • For Active Databases - Within the Aptible Dashboard by:
    • Navigating to the respective Environment in which your Database lives in
    • Selecting the respective Database
    • Selecting the Backups tab
    • Selecting Restore to a New Database from the respective Backup
  • For deprovisioned Databases - Within the Aptible Dashboard by:
    • Navigating to the respective Environment in which your Database Backup lives in
    • Selecting the Backup Management tab
    • Selecting Restore to a New Database for the respective Backup

Restoring a Database from the Aptible Dashboard

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.

🧠 Deep dive: Databases Backups are stored as volume EBS Snapshots. As such, Databases restored from a Backup will initially have degraded disk performance, as described in the "Restoring from an Amazon EBS snapshot" documentation. If you are using a restored Database for performance testing, the performance test should be run twice: once to ensure all of the required data has been synced to disk and the second time to get an accurate result.
Disk initialization time can be minimized by restoring the backup in the same region the Database is being restored to. Generally, this means the original Backup should be restored, not a copy.

If you have special retention needs (such as for a litigation hold), please contact Aptible Support.

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.