ENCRYPTION_KEY.
What to back up
Back up both. A database backup without the matching encryption key leaves your transaction history readable but all bank connections broken β youβd need to re-link every account.
Backup with pg_dump
pg_dump is the most reliable way to back up a running PostgreSQL database. The custom format (-Fc) produces a compressed archive you can restore selectively.
.dump file offsite β a different machine, a cloud bucket, or an encrypted external drive.
Restore from a pg_dump backup
1
Stop or pause Breadbox
Bring down the Breadbox service to avoid writes during restore:
2
Restore the dump
--clean --if-exists drops existing objects before recreating them, making the restore idempotent.3
Restart Breadbox
4
Verify the restore
Check that data came back by querying key tables:Then sign in to the admin dashboard and confirm that connections show their last sync time and status.
Backup the Docker volume
If you run Breadbox with Docker Compose, PostgreSQL data lives in thebreadbox_postgres_data named volume. You can snapshot it directly without connecting to the database.
Restore a volume backup
Automate backups with cron
Save the following script as/usr/local/bin/breadbox-backup.sh to run daily backups and keep a rolling window of recent dumps:
Back up your ENCRYPTION_KEY
YourENCRYPTION_KEY is an environment variable (see the environment variables reference for generation and precedence rules). Itβs not in the database, so database backups do not include it. Store it separately:
- In a password manager (1Password, Bitwarden, etc.)
- In a secrets vault (HashiCorp Vault, AWS Secrets Manager, etc.)
- In encrypted offline storage
Key rotation is a manual process. To change your encryption key, you must decrypt all stored credentials with the old key, re-encrypt them with the new key, and update
ENCRYPTION_KEY before restarting. Breadbox does not automate this. Plan rotations carefully.