Skip to content

Database Backup & Restore

Local PostgreSQL database backups stored on S3 (qa-assets-volare/db-backups/).

Use the Claude Code skills to create and restore backups:

  • /db-backup — Creates a dump and uploads it to S3
  • /db-backup turkey-data — Same, with a description suffix in the filename
  • /db-restore — Lists available backups, downloads one, and restores it
  • Sail running (./vendor/bin/sail up -d)
  • AWS CLI installed and configured with access to the qa-assets-volare bucket
  • Before running artisan migrate:fresh or db:wipe
  • After significant manual data entry in the backoffice
  • Before running destructive test suites
  • Before major migration changes

Dump files are named after your DB_DATABASE value:

{DB_DATABASE}-YYYY-MM-DD.dump
{DB_DATABASE}-YYYY-MM-DD-description.dump

Examples:

  • orbita-dev-2026-03-16.dump — daily snapshot
  • volare-dev-2026-03-16-turkey-data.dump — after adding Turkey supplier data
  • Format: PostgreSQL custom format (-Fc) — compressed, supports selective restore
  • Typical size: ~45 MB
  • Storage: S3 bucket qa-assets-volare/db-backups/ (not in git — .dump files are gitignored)
  • Credentials: reads DB_USERNAME and DB_DATABASE from your backend/.env
  • Restoring a dump from another developer works regardless of role differences (--no-owner --no-privileges)