From 66c3bf3d4c69500492f1c58c57fcf6d7fda78a4f Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 22 Sep 2024 08:46:11 +0100 Subject: Add two scripts to check borg backups for J --- jo_borg_list.sh | 17 +++++++++++++++++ jo_mount_borg.sh | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 jo_borg_list.sh create mode 100755 jo_mount_borg.sh 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." + -- cgit v1.2.3