X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=blobdiff_plain;f=backup;fp=backup;h=421fde9033ce1917c4e6aa8fc3433bb9e1f7aa1f;hp=bbca65e02316c5148e3bd5b5fb554292ad41de6a;hb=7e78611ed422f11239be6537980f7aa551629fcd;hpb=07522d670b2783283acc30140eb38a449588d286 diff --git a/backup b/backup index bbca65e..421fde9 100755 --- a/backup +++ b/backup @@ -40,5 +40,9 @@ $RESTIC backup --exclude-file=$HOME/.config/backup-ignore $HOME || fail # TODO: forget --prune policy: https://restic.readthedocs.io/en/stable/060_forget.html notify-send "Backup finished successfully" -$RESTIC check || fail "BACKUP CHECK FAILED!" +scp .config/backup-passphrase piware.de:.cache/ +ssh piware.de chmod u+w .cache/backup-passphrase +trap "ssh piware.de shred -u .cache/backup-passphrase" EXIT INT QUIT PIPE +ssh piware.de restic --password-file .cache/backup-passphrase --repo backup/restic check || fail "BACKUP CHECK FAILED!" + notify-send "Backup checked successfully"