From: Martin Pitt Date: Sat, 7 Jan 2023 18:04:40 +0000 (+0100) Subject: backup: Run check through ssh X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=7e78611ed422f11239be6537980f7aa551629fcd;p=bin.git backup: Run check through ssh This is much faster and more efficient, as it doesn't need to transfer the files. It requires transfering the passphrase though. --- 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"