Lagoon makes use of the k8up operator to provide backup functionality for both database data as well as containers' persistent storage volumes. This operator utilizes Restic to catalog these backups, which is typically connected to an AWS S3 bucket to provide secure, off-site storage for the generated backups.
Backups of databases and containers' persistent storage volumes happens nightly within production environments by default.
If a different backup schedule for production backups is required, this can be specified at a project level via setting the "Backup Schedule" variables in the project's .lagoon.yml file.
Production environment backups will be held according to the following schedule by default:
- Daily: 7
- Weekly: 6
- Monthly: 1
- Hourly: 0
If a different retention period for production backups is required, this can be specified at a project level via setting the "Backup Retention" variables in the project's .lagoon.yml file.
Backups of development environments are attempted nightly and are strictly a best effort service.
Backups stored in Restic will be tracked within Lagoon, and can be recovered via the "Backup" tab for each environment in the Lagoon UI.
Custom Backup and/or Restore Locations#
Proceed with caution: Setting these variables will override backup/restore storage locations that may be configured at a cluster level. Any misconfiguration will cause backup/restore failures.