This is much faster and more efficient, as it doesn't need to transfer
the files. It requires transfering the passphrase though.
# 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"