Skip to content

Backup & Recovery

Protect your FlightStack data with regular backups.

  • PostgreSQL database - All configuration, pipelines, runs
  • Artifacts (if using local storage) - Build outputs
  • Configuration - .env file, secrets
Terminal window
# Docker
docker-compose exec postgres pg_dump -U flightstack flightstack > backup.sql
# Direct
pg_dump -h localhost -U flightstack flightstack > backup.sql
Terminal window
psql -h localhost -U flightstack flightstack < backup.sql

Set up a cron job:

Terminal window
0 2 * * * pg_dump -h localhost -U flightstack flightstack > /backups/flightstack-$(date +\%Y\%m\%d).sql

If using local storage, backup the artifacts directory:

Terminal window
tar -czf artifacts-backup.tar.gz /var/flightstack/artifacts
  1. Provision new infrastructure
  2. Restore PostgreSQL from backup
  3. Restore artifacts
  4. Update DNS to point to new instance
  5. Re-register build agents