From df5b8f4c90bdaaf3a3ce950ed5c0e348c43adbc3 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 1 Dec 2024 19:17:54 +0000 Subject: [PATCH] Use s3 backend for restic backups It's apparently more stable --- ansible/roles/restic/files/backrest.sh | 6 +++--- ansible/roles/restic/vars/main.yml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ansible/roles/restic/files/backrest.sh b/ansible/roles/restic/files/backrest.sh index a096077..3fcd4e4 100644 --- a/ansible/roles/restic/files/backrest.sh +++ b/ansible/roles/restic/files/backrest.sh @@ -2,10 +2,10 @@ set -e -export B2_ACCOUNT_ID="{{ restic_b2_account_id }}" -export B2_ACCOUNT_KEY="{{ restic_b2_account_key }}" +export AWS_ACCESS_KEY_ID="{{ restic_b2_account_id }}" +export AWS_SECRET_ACCESS_KEY="{{ restic_b2_account_key }}" export RESTIC_PASSWORD="{{ restic_key }}" -export RESTIC_REPOSITORY="b2:{{ restic_b2_bucket }}" +export RESTIC_REPOSITORY="s3:{{ restic_b2_endpoint }}/{{ restic_b2_bucket }}" export GOGC=20 # HACK: Work around for restic's high memory usage https://github.com/restic/restic/issues/1988 set -x diff --git a/ansible/roles/restic/vars/main.yml b/ansible/roles/restic/vars/main.yml index 09ca845..9faa57d 100644 --- a/ansible/roles/restic/vars/main.yml +++ b/ansible/roles/restic/vars/main.yml @@ -24,6 +24,7 @@ restic_key: !vault | 61303164333662353732656265386430383566343462633435626334373331316663363563616662 66643135336539333738623231346331623464636637373639666435663961383936 restic_b2_bucket: 0rng-restic +restic_b2_endpoint: s3.eu-central-003.backblazeb2.com healthchecks_host: https://hc-ping.com restic_homeassistant_mounts: