Working restic restore from snapshot id on boot.

This commit is contained in:
2026-04-23 19:01:12 -07:00
parent f3b9bfee9a
commit ce5d3f0cc6
6 changed files with 70 additions and 6 deletions

8
restic-restore.sh Normal file
View 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"