-
-
Notifications
You must be signed in to change notification settings - Fork 0
Backup & Restore
This page covers backup-specific operations. For installation, reverse proxy, phone sync, and production setup, use the Self-Hosting Guide.
- Docker with Compose v2 is installed and running
- Tribu uses the standard Compose setup or an equivalent stack
- The backend can write to
/backups - You know where your
.env, Compose file, reverse proxy config, and TLS material are stored
| Included in Tribu backup | Not included |
|---|---|
| PostgreSQL database dump |
.env secrets |
| backup metadata | reverse proxy config |
| family data stored in the database | TLS certificates |
| calendars, contacts, birthdays, tasks, shopping, rewards, gifts, recipes, meal plans, settings | host-level files outside the database and backup volume |
| OIDC settings stored in the database | external storage configuration |
Valkey is not backed up because it stores cache data only.
Run from the repository root:
./scripts/backup.shTo write the archive to a specific directory, for example a NAS mount:
./scripts/backup.sh --output-dir /mnt/nas/backups/tribuThis creates a tribu-backup-YYYY-MM-DD-HHMMSS.tar.gz archive containing:
-
database.dump: PostgreSQL dump in custom format -
metadata.json: backup version, Alembic revision, PostgreSQL version, timestamp
Admins can manage backups from the Admin panel.
Open Admin > Backups and choose a schedule:
| Preset | When |
|---|---|
| Off | No automatic backups |
| Daily | Every day at 03:00 |
| Weekly | Every Sunday at 03:00 |
| Monthly | 1st of each month at 03:00 |
Set retention to control how many backups are kept. Older backups are deleted automatically.
Click Create backup to trigger a backup immediately. The archive appears in the list and can be downloaded.
By default backups are stored in a Docker volume. For a NAS or external drive, bind mount a host path to /backups on the backend service:
backend:
volumes:
- /mnt/nas/backups/tribu:/backupsMake sure the backend container can write to that path.
Do not wait for a real outage to test restore.
- Start a fresh Tribu stack with a new database volume.
- Copy a backup archive to the server.
- Configure
.envmanually. Secrets are not included in the backup. - Restore during the setup wizard or with the restore script.
- Sign in and verify:
- family exists
- calendar, tasks, shopping, contacts, rewards, gifts, recipes, and settings are present
- migrations completed
- reverse proxy and phone sync still use the expected public URL
./scripts/restore.sh path/to/tribu-backup-2026-02-24-143022.tar.gzThe script shows backup metadata and asks for confirmation before proceeding.
- Changing
JWT_SECRETinvalidates existing sessions and tokens. - OIDC client secrets stored in the database are part of the database backup. Treat backup archives as sensitive.
- Keep
.env, Compose overrides, reverse proxy config, TLS certificates, and external mount configuration in your normal server backup. - Store backups somewhere other than the same disk when possible.
- Test restore after major upgrades.
- Check
docker compose logs backend. - Confirm the backend can write to
/backups. - Check free disk space.
- If using a NAS mount, check mount permissions and availability.
- Confirm the archive is a Tribu backup archive.
- Check metadata in the archive if available.
- Use a fresh database volume for restore drills.
- Confirm the target version can run pending migrations.
- Confirm
JWT_SECRETis set. - If you changed
JWT_SECRET, existing sessions and tokens are invalid and users need to log in again. - Check OIDC settings if SSO is enabled.