Skip to content

Commit

Permalink
extended log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
benderl committed Dec 19, 2024
1 parent 34beead commit 57f256e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions runs/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ TARBASEDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
BACKUPDIR="$OPENWBBASEDIR/data/backup"
RAMDISKDIR="$OPENWBBASEDIR/ramdisk"
TEMPDIR="$RAMDISKDIR/temp"
LOGFILE="$OPENWBBASEDIR/data/log/backup.log"
LOGDIR="$OPENWBBASEDIR/data/log"
LOGFILE="$LOGDIR/backup.log"

useExtendedFilename=$1
if ((useExtendedFilename == 1)); then
Expand All @@ -18,6 +19,18 @@ else
fi

{
echo "starting backup script"
echo "environment:"
echo " OPENWBBASEDIR: $OPENWBBASEDIR"
echo " OPENWBDIRNAME: $OPENWBDIRNAME"
echo " TARBASEDIR: $TARBASEDIR"
echo " BACKUPDIR: $BACKUPDIR"
echo " RAMDISKDIR: $RAMDISKDIR"
echo " TEMPDIR: $TEMPDIR"
echo " LOGDIR: $LOGDIR"
echo " LOGFILE: $LOGFILE"
echo " FILENAME: $FILENAME"

echo "deleting old backup files if present in '$BACKUPDIR'"
# remove old backup files
rm -v "$BACKUPDIR/"*
Expand Down Expand Up @@ -88,7 +101,7 @@ fi
rm -rf "${TEMPDIR:?}/"
tar --append \
--file="$BACKUPFILE" \
--directory="$OPENWBBASEDIR/data/log/" \
--directory="$LOGDIR/" \
"backup.log"
echo "zipping archive"
gzip --verbose "$BACKUPFILE"
Expand Down

0 comments on commit 57f256e

Please sign in to comment.