Backup and Restore
What a backup contains, and how to restore one on the same or a new server.
Back up
make backupThis writes backups/<timestamp>/ with:
| File | Contents |
|---|---|
database.dump | The whole database, as a pg_dump archive. |
blob-data.tar.gz | Every uploaded file, when the bundled blob storage is used. |
env | A copy of .env. |
Upload and Media stop while the files are copied, so the copy is consistent. The portal stays up; uploads fail for that time.
A backup contains secrets. Store it as you would store the server’s credentials.
With Azure Blob Storage there is no blob volume on the server and only the database is backed up. Back the storage account up in Azure.
Restore
make restore from=backups/<timestamp>This replaces the current database and media files, after a typed confirmation.
Restore on a new server
- Clone the installer.
- Copy the backup’s
envfile to.env. - Run
./install.sh --skip-user-creation. - Run
make restore from=backups/<timestamp>.
The same .env matters: sessions are signed with its JWT key, and the upload token stored in
the database has to match.