diff --git a/main.inc.sh b/main.inc.sh index 78a524e..d78f1ec 100755 --- a/main.inc.sh +++ b/main.inc.sh @@ -456,7 +456,7 @@ backup_all_dirs() { # # $1 - Pfad zum Verzeichnis, das gesichert werden soll # $2 - Zielpfad und -name für das Archiv -# $2 - zu sicherndes Verzeichnis +# $3 - zu sicherndes Verzeichnis # # returns 0 for success, 1 otherwise # @@ -482,7 +482,7 @@ backup_directory() { # # $1 - Pfad zum Verzeichnis, das gesichert werden soll # $2 - Zielpfad und -name für das Archiv -# $2 - zu sicherndes Verzeichnis +# $3 - zu sicherndes Verzeichnis # # returns 0 for success, 1 otherwise # @@ -492,11 +492,13 @@ tar_dir() { local archive=$2 local dir=$3 local sort=--sort=name + local tar_warn=--warning=no-file-ignored if [[ "$(uname)" == "Darwin" ]]; then sort="" + tar_warn="" fi - log $DEBUG "$DBG > tar -c -z --warning=\"no-file-ignored\" --numeric-owner --one-file-system $sort --exclude \"@eaDir\" -C \"$root\" \"$dir\" | gpg --batch -c --passphrase xxxx -o \"$archive\"" - tar -c -z --warning="no-file-ignored" --numeric-owner --one-file-system $sort --exclude "@eaDir" -C "$root" "$dir" 2>>$LOG_FILE | gpg --batch -c --passphrase $PASSPHRASE -o "$archive" 2>>$LOG_FILE + log $DEBUG "$DBG > tar -c -z $tar_warn --numeric-owner --one-file-system $sort --exclude \"@eaDir\" -C \"$root\" \"$dir\" | gpg --batch -c --passphrase xxxx -o \"$archive\"" + tar -c -z $tar_warn --numeric-owner --one-file-system $sort --exclude "@eaDir" -C "$root" "$dir" 2>>$LOG_FILE | gpg --batch -c --passphrase $PASSPHRASE -o "$archive" 2>>$LOG_FILE check_pipe_rc ${PIPESTATUS[@]} return $? } diff --git a/main.sh b/main.sh index 7da960b..35400a4 100755 --- a/main.sh +++ b/main.sh @@ -3,6 +3,9 @@ # entrypoint for all actions # +# 2.3.9 26.01.2026 - fix: tar param ohne Anführungszeichen +# 2.3.8 25.01.2026 - fix tar parameter (--warning on macOS not available) +# 2.3.7 21.12.2025 - container/.local wird jetzt tatsächlich übersprungen # 2.3.6 21.12.2025 - another fix for the tar command # 2.3.5 20.12.2025 - fix not only logging but tar command itself # 2.3.4 19.12.2025 - fix tar param: --warning="no-file-ignored" @@ -36,7 +39,7 @@ # 2.1.7 29.04.2025 - 1. Schritt zur Umstellung auf podman # 2.1.6 29.04.2025 - weekly backup Sa->SO -VER="2.3.6" +VER="2.3.9" HERE=$(dirname "$0") THIS_SCRIPT=$0 diff --git a/nathan.sh b/nathan.sh index 216fc7c..12794c9 100755 --- a/nathan.sh +++ b/nathan.sh @@ -10,7 +10,7 @@ NAS_TARGET="$NAS_ROOT/daily/$HOST_NAME/backup.$DAY" backup_daily1() { BACKUP_SOURCE="/var" - BACKUP_EXCLUDE_DIRS=(containers home/container/.local/share/containers) + BACKUP_EXCLUDE_DIRS=(containers home) } backup_daily2() { @@ -23,6 +23,18 @@ backup_daily3() { BACKUP_EXCLUDE_DIRS=() } +backup_daily4() { + BACKUP_SOURCE="/var/home" + BACKUP_EXCLUDE_DIRS=(container) +} + +backup_daily5() { + BACKUP_SOURCE="/var/home/container" + # wg. Problemen mit container/.local/share/containers/storage + BACKUP_EXCLUDE_DIRS=(.local) +} + + before_backup() { let local rc=0