fix tar param wg. macOS
This commit is contained in:
1 parent
c5648a9694
commit
56f7e63f9e
3 files changed
+23
-6
No files matched your search
+6
-4
@@ -456,7 +456,7 @@ backup_all_dirs() {
|
|||||||
#
|
#
|
||||||
# $1 - Pfad zum Verzeichnis, das gesichert werden soll
|
# $1 - Pfad zum Verzeichnis, das gesichert werden soll
|
||||||
# $2 - Zielpfad und -name für das Archiv
|
# $2 - Zielpfad und -name für das Archiv
|
||||||
# $2 - zu sicherndes Verzeichnis
|
# $3 - zu sicherndes Verzeichnis
|
||||||
#
|
#
|
||||||
# returns 0 for success, 1 otherwise
|
# returns 0 for success, 1 otherwise
|
||||||
#
|
#
|
||||||
@@ -482,7 +482,7 @@ backup_directory() {
|
|||||||
#
|
#
|
||||||
# $1 - Pfad zum Verzeichnis, das gesichert werden soll
|
# $1 - Pfad zum Verzeichnis, das gesichert werden soll
|
||||||
# $2 - Zielpfad und -name für das Archiv
|
# $2 - Zielpfad und -name für das Archiv
|
||||||
# $2 - zu sicherndes Verzeichnis
|
# $3 - zu sicherndes Verzeichnis
|
||||||
#
|
#
|
||||||
# returns 0 for success, 1 otherwise
|
# returns 0 for success, 1 otherwise
|
||||||
#
|
#
|
||||||
@@ -492,11 +492,13 @@ tar_dir() {
|
|||||||
local archive=$2
|
local archive=$2
|
||||||
local dir=$3
|
local dir=$3
|
||||||
local sort=--sort=name
|
local sort=--sort=name
|
||||||
|
local tar_warn=--warning=no-file-ignored
|
||||||
if [[ "$(uname)" == "Darwin" ]]; then
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
sort=""
|
sort=""
|
||||||
|
tar_warn=""
|
||||||
fi
|
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\""
|
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 --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
|
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[@]}
|
check_pipe_rc ${PIPESTATUS[@]}
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
# entrypoint for all actions
|
# 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.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.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"
|
# 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.7 29.04.2025 - 1. Schritt zur Umstellung auf podman
|
||||||
# 2.1.6 29.04.2025 - weekly backup Sa->SO
|
# 2.1.6 29.04.2025 - weekly backup Sa->SO
|
||||||
|
|
||||||
VER="2.3.6"
|
VER="2.3.9"
|
||||||
|
|
||||||
HERE=$(dirname "$0")
|
HERE=$(dirname "$0")
|
||||||
THIS_SCRIPT=$0
|
THIS_SCRIPT=$0
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ NAS_TARGET="$NAS_ROOT/daily/$HOST_NAME/backup.$DAY"
|
|||||||
|
|
||||||
backup_daily1() {
|
backup_daily1() {
|
||||||
BACKUP_SOURCE="/var"
|
BACKUP_SOURCE="/var"
|
||||||
BACKUP_EXCLUDE_DIRS=(containers home/container/.local/share/containers)
|
BACKUP_EXCLUDE_DIRS=(containers home)
|
||||||
}
|
}
|
||||||
|
|
||||||
backup_daily2() {
|
backup_daily2() {
|
||||||
@@ -23,6 +23,18 @@ backup_daily3() {
|
|||||||
BACKUP_EXCLUDE_DIRS=()
|
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() {
|
before_backup() {
|
||||||
let local rc=0
|
let local rc=0
|
||||||
|
|||||||
Reference in new issue
Block a user