Back up and restore a site
This guide covers keeping copies of your site and bringing it back from one: checking the backups, taking one by hand, restoring from the admin, and undoing a restore.
Before you start: an admin account. Backups are configured on the server by whoever runs it, with environment variables (BACKUP_TARGET, BACKUP_SCHEDULE, BACKUP_RETENTION_DAYS, BACKUP_ENCRYPTION_KEY; see install.md, Backups). On a site run by a hosting platform, the host keeps its own backups and restores them from your hosting account; the admin links there.
Check the backups
- Site settings → System. The Backups card shows the Target (a bucket or a directory), the Schedule and when it next runs, the Retention and the Encryption. Until a target is set, the card says how to set one.
- Read Backup runs: when each started, its Trigger (the schedule, by hand, the command line or Before a restore), Status, Size and Location. A failed run shows its error and sends the Backup failed notification to any rule set up for it (Site settings → Notifications).
- Run now takes a backup at once and reports its size. Do this before a large change, such as installing a kit or importing a website.
Each run holds the database, the media, form uploads, installed modules and the instance's key files (which decrypt stored credentials). Without BACKUP_ENCRYPTION_KEY the card warns and marks runs that hold the keys in clear.
Restore a backup
- On the run you want, choose Restore (administrators with
system.restore). - Read the dialog: when the backup was taken (Everything changed after that is lost), what is Replaced with the backup's copy and what is Kept as it is now.
- Type the site's name or its address to confirm, and choose Restore.
- A backup of the site as it is now is taken first, listed as Before a restore. The run is downloaded and checked while the site keeps serving, then the server restarts to put it in place: the site is offline for a few seconds and the admin reloads by itself.
Check the result
- A banner says Restored from the backup of that time, and the content is as it was then.
- To go back, choose Undo on the banner (within 24 hours) and type the name again: the site returns to how it was just before the restore. Anything changed since the restore is lost.
Notes
- On Postgres, and for a run on another target, the dialog explains how to restore on the server with
spillway restoreinstead. - For one page, you rarely need a backup: Restore an earlier version brings back any saved revision.
- System → Go live checks that backups are configured, encrypted and that the last run passed.
Going further
- Update Spillway, modules and kits, the next step.
- System in the manual; install.md, Backups for the server side.
Spillway 0.1.24