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:

VariableMeaning
BACKUP_DIRWhere backups are written
RETENTION_DAYSHow long to keep them
BACKUP_S3_TARGETOptional 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.yaml and the .env file
  • The encryption key. Without it, stored secrets and buffered data cannot be read

Something missing or wrong on this page? Tell us.