configs_backup.sh now saves all root files (not only the docker-compose.yml).

This commit is contained in:
Kovács Zoltán
2026-05-02 23:12:36 +02:00
parent 358211bcff
commit 5b0b5ae2d3
2 changed files with 5 additions and 3 deletions
BIN
View File
Binary file not shown.
+5 -3
View File
@@ -5,6 +5,8 @@
#
# Author: Kovács Zoltán <kovacsz@marcusconsulting.hu>
# License: GNU/GPL v3+ (https://www.gnu.org/licenses/gpl-3.0.en.html)
# 2026-04-28 v0.3
# mod: now includes all files (not only YMLFILE) in the base folder.
# 2024-03-07 v0.2
# fix: tar now dereferences the symlinks (if any).
# 2021-09-03 v0.1 Initial release
@@ -26,7 +28,7 @@ MSG_NONWRITE="The target directory isn't writable"
# Checks the dependencies.
TR=$(which tr 2>/dev/null)
if [ -z "$TR" ]; then echo "$MSG_MISSINGDEP tr."; exit 1 ; fi
for item in date dirname hostname readlink tar
for item in date dirname find hostname readlink tar
do
if [ -n "$(which $item)" ]
then export $(echo $item | "$TR" '[:lower:]' '[:upper:]' | "$TR" '-' '_')=$(which $item)
@@ -72,8 +74,8 @@ if [ -w "$BACKUPDIR" ]; then
BACKUP_NAME="configs.$("$DATE" '+%Y%m%d_%H%M%S').$("$HOSTNAME")"
( cd "$BASE_DIR"
"$TAR" czhf "$BACKUPDIR/$BACKUP_NAME.tgz" \
"$YMLFILE" configs docker \
2>>"$BACKUPDIR/$BACKUP_NAME.log"
$("$FIND" -maxdepth 1 -type f) configs docker \
2>>"$BACKUPDIR/$BACKUP_NAME.log"
)
fi