diff --git a/plugins/transfer/restic.sh b/plugins/transfer/restic.sh index be5b4d37ad44b3fa37d0fbb701e0590000d9eed9..0b8b3b9e2b9a1e0a9a1168704bd238e84a96821a 100644 --- a/plugins/transfer/restic.sh +++ b/plugins/transfer/restic.sh @@ -18,6 +18,7 @@ # 2022-11-04 ah v1.0 one command for forget and prune; rename hooks # 2023-03-20 ah v1.1 use vss for backup on MS Windows # 2024-01-23 ah v1.2 prune uses --max-unused unlimited +# 2024-01-31 ah v1.3 fix replace of fqdn # ================================================================================ # -------------------------------------------------------------------------------- @@ -38,9 +39,9 @@ # TODO: for restic with https and auth - remove the host in the path local _target=$( j_getFullTarget ) - echo ${_target} | grep "https.*@" >/dev/null - if [ $? -eq 0 ]; then - _target=$( echo $_target | sed "s#${FQDN}/##" ) + if grep "^rest:http.*@" <<< "${_target}" >/dev/null; then + local _regex=${FQDN//\./\\.} + _target=$( echo $_target | sed "s#${_regex}/##" ) fi export RESTIC_REPOSITORY=$_target diff --git a/restore.sh b/restore.sh index ea4b4acb6ca3bc4532e89bc659209d952239c5f2..14b441b658f90a986125e6514c738ccf7fc8344c 100755 --- a/restore.sh +++ b/restore.sh @@ -234,18 +234,24 @@ function doRestore(){ h1 "Restore :: Menu" - echo " D - directory to restore: $BACKUP_DIR" - echo -n " W - time or snapshot ID : $RESTORE_ITEM" + echo " D - directory to restore: $( color cmd ; echo -n $BACKUP_DIR; color reset)" + echo + echo "---------- Restore method 1:" + echo + echo " M - mount backup with fuse" + echo + echo "---------- Restore method 2:" + echo + echo -n " W - time or snapshot ID : $( color cmd ; echo -n $RESTORE_ITEM; color reset)" test -z "$RESTORE_ITEM" && echo -n " ... set one first" test -z "$RESTORE_ITEMINFO" || echo -n " ($RESTORE_ITEMINFO)" echo - echo -n " F - what to restore : $RESTORE_FILTER" + echo -n " F - what to restore : $( color cmd ; echo -n $RESTORE_FILTER; color reset)" test -z "$RESTORE_FILTER" && echo -n "(no filter = restore all files)" echo echo - echo " M - mount backup" # echo " C - show file changes" - # echo " S - search file" + echo " S - search files" # echo " V - verify" # echo echo " R - start restore with $STORAGE_BIN" @@ -266,6 +272,8 @@ function doRestore(){ echo "(not set)" fi echo + echo "---------- Other:" + echo echo " B - Bash (Shell)" echo " X - exit" echo