Backup and Recovery
Backing up and restoring the FabConnect database.
Everything FabConnect keeps is in PostgreSQL, plus the durable buffer file (buffer.dir, when enabled), your configuration files and secrets.
Backup
scripts/backup.sh takes a verified pg_dump | gzip backup. It reads the standard libpq variables plus:
| Variable | Meaning |
|---|---|
BACKUP_DIR | Where backups are written |
RETENTION_DAYS | How long to keep them |
BACKUP_S3_TARGET | Optional copy to object storage |
On Kubernetes, k8s/backup-cronjob.yaml runs the same on a schedule.
Restore
scripts/restore.sh takes a safety dump of the current database first, then restores in a single transaction that stops at the first error.
Also back up
config.yamland the.envfile- The encryption key. Without it, stored secrets and buffered data cannot be read