I haven't followed the development of bacula, so maybe this has been
addressed in the past.
I was forever having trouble with laptop users not being on-line when
backups fired off. A member from another forum provided the following
script that can be run from cron on the bacula box. It tested out fine
for me, and I thought others would find it useful. It will ping the
hostname; if found, it will create a txt file and run a script with your
bconsole commands. The next time cron runs, the script will check the
date of the txt file, if the date is equal to today, it will not run the
backup a second time.
enjoy :)
#!/bin/bash
HOST="windowshostname"
CMD="ping -c1 $HOST"
CMD_RET=`$CMD`
# echo $CMD_RET
NOWDATE=`date +%Y%m%d`
if [ -f ping_check.txt ];
then
FILEDATE=`cat ping_check.txt`
else
FILEDATE=0
fi
if [ $NOWDATE -ne $FILEDATE ];
then
if [[ $CMD_RET =~ ", 0% packet loss" ]]
then
echo "$HOST pinged ..."
echo $NOWDATE > ping_check.txt
# run backup script
else
echo "$HOST did not ping ..."
fi
fi
exit
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|