1 Commits
Author SHA1 Message Date
Hartmut Bauer 56f7e63f9e fix tar param wg. macOS 2026-01-26 16:21:33 +01:00
3 changed files with 23 additions and 6 deletions

No files matched your search

+6 -4
View File
@@ -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 $?
}
+4 -1
View File
@@ -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
+13 -1
View File
@@ -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