Minor improvements.
This commit is contained in:
@ -3,8 +3,10 @@
|
||||
# Backups the configuration files of this docker-composed service.
|
||||
# This is a general purpose worker script, doesn't requires customization.
|
||||
#
|
||||
# Author: Kovács Zoltán <kovacs.zoltan@smartfront.hu>
|
||||
# Author: Kovács Zoltán <kovacsz@marcusconsulting.hu>
|
||||
# License: GNU/GPL v3+ (https://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||
# 2024-03-07 v0.2
|
||||
# fix: tar now dereferences the symlinks (if any).
|
||||
# 2021-09-03 v0.1 Initial release
|
||||
|
||||
# Accepted environment variables and their defaults.
|
||||
@ -69,7 +71,7 @@ BACKUPDIR="${PAR_BACKUPDIR:-$BASE_DIR/$BACKUPDIR}"
|
||||
if [ -w "$BACKUPDIR" ]; then
|
||||
BACKUP_NAME="configs.$("$DATE" '+%Y%m%d_%H%M%S').$("$HOSTNAME")"
|
||||
( cd "$BASE_DIR"
|
||||
"$TAR" czf "$BACKUPDIR/$BACKUP_NAME.tgz" \
|
||||
"$TAR" czhf "$BACKUPDIR/$BACKUP_NAME.tgz" \
|
||||
"$YMLFILE" configs docker \
|
||||
2>>"$BACKUPDIR/$BACKUP_NAME.log"
|
||||
)
|
||||
|
Reference in New Issue
Block a user