Back up and upgrade a self-hosted Requestarium
Self-hosting means the backups are yours. Requestarium's self-hosted bundle comes with a backup agent and an upgrade script that does the boring, important parts for you, but there are three things only you can do: choose where the dumps go, keep the encryption keys somewhere safe, and try a restore before you need one.
What gets backed up, and what doesn't
| Thing | Where | Backed up by |
|---|---|---|
| Database: accounts, workspaces, collections, history, licence | Postgres | the backup agent |
TAIRI_DATA_ENCRYPTION_KEY, TAIRI_MFA_ENCRYPTION_KEY, TAIRI_JWT_SECRET | .env, or the keys Secret on Kubernetes | you |
| Your own TLS certificates | the host | you |
The dumps deliberately leave the keys out. Restored without them, the database works but every encrypted value (stored secrets, SSO and bot tokens, authenticators) is unreadable. Keep keys and dumps in different places, so whoever gets one doesn't have the other.
Set up the schedule
Installation administrators open Settings ▸ Installation ▸ Backups:
- Schedule: every 6 or 12 hours, daily, weekly, or a cron expression. Always UTC.
- Target: a directory, or a bucket on Amazon S3, Cloudflare R2, MinIO, Backblaze B2, Hetzner Object Storage, Google Cloud Storage or Azure Blob. Test connection checks it.
- Retention: by age (14 days by default) and, optionally, by count. The newest dump is always kept.
- Verification:
checksum(default) compares each dump to its manifest;restorealso restores it into a scratch database you provide. - Alerts: email administrators about failed and overdue backups.
Back up now queues a dump that starts within seconds; the screen follows it through dumping, encrypting, uploading and verifying. Each dump gets a manifest next to it with size, SHA-256 and version, so it can be checked and restored even if the database that recorded it is gone.
Restore
The Restore… button next to a dump shows the exact commands, with a pre-flight check. On Docker Compose:
docker compose stop backend
docker compose run --rm backup backup restore latest --check
docker compose run --rm backup backup restore latest --yes
docker compose up -dA restore replaces the whole database in one transaction. If anything fails, Postgres rolls it back and the database is exactly as it was. Stop the backend first, as above.
On Kubernetes, the chart package has scripts/restore-k8s.sh, which scales the backend to zero, restores and scales it back.
Upgrade
On Compose, ./upgrade.sh <version> checks that the new version's migrations can run on your database, takes a backup, then switches. On Kubernetes, a pre-upgrade hook runs the same check and stops helm upgrade before anything changes if it fails.
Database migrations run when the new server starts. Settings ▸ Installation ▸ Updates tells you when a new version is out, and whether you need an intermediate version first.
Roll back
If a new version misbehaves:
- Compose:
./upgrade.sh --rollbackstops the backend, restores the pre-upgrade dump with the previous image, switches.envback and starts. - Helm: restore the pre-upgrade dump with
restore-k8s.sh … --keep-stopped, thenhelm rollback.
Anything written after the pre-upgrade dump is lost by a rollback, so prefer a patch release when the problem is small.
Check it all at once
docker compose exec backend /requestarium-api doctorThe doctor checks configuration, the database, migrations, the clock, licence and seats, email, backups ("last backup older than 36 hours" is a warning) and updates, and prints a fix for each problem.