I've made some modifications to the original script source:
First: Prefixing the Backuplist filename with the $BACKUPWEEK variable to make manual moves of the non-current-week files to the "old" directory so they're held alongside the .dar and .dar.md5 files (which the script moves automatically). e.g. "mv 36* ../old" is all that's required.
Code:
# over view of all the files which where backed up
echo
echo "Create file listing from archive"
if [ $CRYPT = "yes" ]
then
KEY=`cat "$PASSDIR""$PASSFILE"`
nice -19 $DAR_BIN -K bf:$KEY -l "$ARCHIVEDIR""$BACKUPWEEK"_"$BACKUPNAME"_"$BACKUPDATE"_"$BACKUPTYPE_D" -Q\
> "$ARCHIVEDIR""$BACKUPWEEK"_Backuplist_"$BACKUPDATE".txt && gzip -9 "$ARCHIVEDIR""$BACKUPWEEK"_Backuplist_"$BACKUPDATE".txt
else
nice -19 $DAR_BIN -l "$ARCHIVEDIR""$BACKUPWEEK"_"$BACKUPNAME"_"$BACKUPDATE"_"$BACKUPTYPE_D" -Q\
> "$ARCHIVEDIR""$BACKUPWEEK"_Backuplist_"$BACKUPDATE".txt && gzip -9 "$ARCHIVEDIR""$BACKUPWEEK"_Backuplist_"$BACKUPDATE".txt
fi Second: I've modified the timer report section of the script so that it calculates the elapsed time correctly. The original script often reported nonsense elapsed times of 1hr 93mins etc.
Code:
# Script Timer
STOPTIME=(`date +%s`)
RUNTIME=$(expr $STOPTIME - $STARTTIME)
echo
echo "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
echo "Diff Zimbra Backup ended at: `date +%H:%M`"
echo "Backup took $(date -d "1970-01-01 $RUNTIME sec" +%H:%M:%S) to complete"
echo "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" Both modifications need to be made twice; once each in the FULL and DIFF sections of the script, with minor differences between edits to make them appropriate for the section.
Christian