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.json
attachment from therestic-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
-
Access the
IV-Restic Bucket
item in BitWarden, and export theRESTIC_PASSWORD
to 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