Skip to Content
Self-HostedBackup and Restore

Backup and Restore

What a backup contains, and how to restore one on the same or a new server.

Back up

make backup

This writes backups/<timestamp>/ with:

FileContents
database.dumpThe whole database, as a pg_dump archive.
blob-data.tar.gzEvery uploaded file, when the bundled blob storage is used.
envA 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

  1. Clone the installer.
  2. Copy the backup’s env file to .env.
  3. Run ./install.sh --skip-user-creation.
  4. 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.