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:
-
Download the
restic-restorer.jsonattachment from therestic-restorer service account key for GCPitem 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 -
Access the
IV-Restic Bucketitem in BitWarden, and export theRESTIC_PASSWORDto your shell environment:export RESTIC_PASSWORD=abcdef -
Configure restic to connect to the GCP bucket:
export RESTIC_REPOSITORY=gs:indevets-mirror:/ -
List available snapshots:
restic --no-lock snapshots -
Download desired snapshot:
restic --no-lock dump 7b8f828a /indevets-core.sql.gz > /tmp/indevets-core.sql.gz