Working restic restore from snapshot id on boot.
This commit is contained in:
8
restic-restore.sh
Normal file
8
restic-restore.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
MARKER=/var/lib/firstboot.done
|
||||
|
||||
if [ ! -f "$MARKER" ] && [ -n "$RESTIC_SNAPSHOT_ID" ]; then
|
||||
docker run --rm --volume /nassella:/nassella --volume /restic-password:/restic-password -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} -i restic/restic:0.18.0 restore "$RESTIC_SNAPSHOT_ID" --verbose --repo s3:${BACKBLAZE_BUCKET_URL} --password-file /restic-password --target /
|
||||
fi
|
||||
|
||||
touch "$MARKER"
|
||||
Reference in New Issue
Block a user