Hi guys, I'm using Bacula 7.4.4 and got a script which runs after every backup and expects a list of file names which were backed up. Now I noticed that bacula is writing the files to the Catalog at the end of the backup process, thus the script receives an empty list and doesn't run properly. Below I got an excerpt of this script:
export HOME; HOME="/opt/bacula" export LOG; LOG="$HOME/var/cleanup.$1.log" echo "Cleaning job $1">>$LOG $HOME/bin/bconsole <<EOF @output /dev/null messages @output $HOME/var/cleanup.$1.set llist files jobid="$1" EOF for file in $( egrep "^\|" $HOME/var/cleanup.$1.set | sed -e "s/\|//g" ) do if [ $file != "Filename" ] then AGE=$(perl -e "print (-M \"$file\");"|cut -d'.' -f1) ## Get age of file if test -d $file ; then ## If line is a directory echo "Directory $file ... skipping...">>$LOG elif echo $file|egrep '.gz$' 2>&1 >/dev/null ; then ## Test if file has ".gz" suffix if [ "$AGE" -gt "$KEEP" ] ; then echo "$file is older than $KEEP days -> removing">>$LOG pfexec rm $file ## Removing files older than 7 days else echo "$file is younger than $KEEP days -> keeping">>$LOG In Bacula 5 this issue isn't present so the file list is available almost instantly. Did something change between the versions regarding this behavior? Thanks and best regards, Daniel Heitepriem ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users