Skip to content

Download archived ΒΆ

Every hour, the entire primary PostgreSQL database is snapshoted to a restic repository stored in Linode object storage. The Linode object storage bucket is then mirrored using rclone to an append-only GCP bucket with unlimited deleted object retention.

To read a database snapshot from the GCP bucket:

  1. Download the restic-restorer.json attachment from the restic-restorer service account key for GCP item in BitWarden, and export authentication for the GCP bucket to your shell environment:

    export GOOGLE_APPLICATION_CREDENTIALS=~/Downloads/restic-restorer.json
    export GOOGLE_PROJECT_ID=451406464052
    
  2. Access the IV-Restic Bucket item in BitWarden, and export the RESTIC_PASSWORD to your shell environment:

    export RESTIC_PASSWORD=abcdef
    
  3. Configure restic to connect to the GCP bucket:

    export RESTIC_REPOSITORY=gs:indevets-mirror:/
    
  4. List available snapshots:

    restic --no-lock snapshots
    
  5. Download desired snapshot:

    restic --no-lock dump 7b8f828a /indevets-core.sql.gz > /tmp/indevets-core.sql.gz