diff options
author | Matthew Lemon <y@yulqen.org> | 2024-09-22 08:46:11 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-09-22 08:46:11 +0100 |
commit | 66c3bf3d4c69500492f1c58c57fcf6d7fda78a4f (patch) | |
tree | cb6db7d7aba9e3dcfc301c5e56b063fd12d4f1d4 | |
parent | 6fd94f891da2221c1bf781288aa1e0aad9d759bb (diff) |
Add two scripts to check borg backups for J
-rwxr-xr-x | jo_borg_list.sh | 17 | ||||
-rwxr-xr-x | jo_mount_borg.sh | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/jo_borg_list.sh b/jo_borg_list.sh new file mode 100755 index 0000000..d3788da --- /dev/null +++ b/jo_borg_list.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Save the current BORG_PASSCOMMAND value +OLD_BORG_PASSCOMMAND=$BORG_PASSCOMMAND + +# Unset the BORG_PASSCOMMAND to force passphrase prompt +unset BORG_PASSCOMMAND + +# Run the borg list command (replace /path/to/repo with your actual repository) +borg list ssh://u423613@u423613.your-storagebox.de:23/./backups/jo_macbook + +# Restore the original BORG_PASSCOMMAND +export BORG_PASSCOMMAND="$OLD_BORG_PASSCOMMAND" + +# Optional: Notify that the script has finished +echo "Borg list executed, and BORG_PASSCOMMAND restored." + diff --git a/jo_mount_borg.sh b/jo_mount_borg.sh new file mode 100755 index 0000000..6111b6a --- /dev/null +++ b/jo_mount_borg.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Save the current BORG_PASSCOMMAND value +OLD_BORG_PASSCOMMAND=$BORG_PASSCOMMAND + +# Unset the BORG_PASSCOMMAND to force passphrase prompt +unset BORG_PASSCOMMAND + +# Run the borg list command (replace /path/to/repo with your actual repository) +borgfs ssh://u423613@u423613.your-storagebox.de:23/./backups/jo_macbook /mnt/borg + +# Restore the original BORG_PASSCOMMAND +export BORG_PASSCOMMAND="$OLD_BORG_PASSCOMMAND" + +# Optional: Notify that the script has finished +echo "Borg list executed, and BORG_PASSCOMMAND restored." + |