aboutsummaryrefslogtreecommitdiff
path: root/restic_restore_gen
diff options
context:
space:
mode:
Diffstat (limited to 'restic_restore_gen')
-rwxr-xr-xrestic_restore_gen16
1 files changed, 16 insertions, 0 deletions
diff --git a/restic_restore_gen b/restic_restore_gen
new file mode 100755
index 0000000..e4bf5cb
--- /dev/null
+++ b/restic_restore_gen
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+svc=$1 # dovecot, plume, cryptpad, or consul
+commit=$2 # backup id you want to restore, from restic summary
+target=$3 # where to restore
+
+cat <<EOF
+PROOFREAD AND THEN COPY PASTE:
+----------------------------------------------------------------------------
+export RESTIC_REPOSITORY=`pass deuxfleurs/backups/$svc/restic_repository`
+export RESTIC_PASSWORD=`pass deuxfleurs/backups/$svc/restic_password`
+export AWS_ACCESS_KEY_ID=`pass deuxfleurs/backups/$svc/aws_s3_access_key`
+export AWS_SECRET_ACCESS_KEY=`pass deuxfleurs/backups/$svc/aws_s3_secret_key`
+restic restore $commit --target $target
+----------------------------------------------------------------------------
+EOF