Re: [BackupPC-users] Re-read hostname config after DumpPreUserCmd
2011-04-15 04:44:51
Marcos Lorenzo de Santiago napsal(a):
>
> I just don't use PingCmd for this particular cases as it is the first
> thing BackupPC runs. So if I turn off the virtual machine BackupPC would
> try to ping the virtual machine and find out it's unreachable so it will
> never begin the backup. And viceversa.
This is how we turn machines on via WOL before backing up:
config.pl:
$Conf{PingPath} = "/etc/backuppc/bin/wolping.sh";
/etc/backuppc/bin/wolping.sh:
#! /bin/bash
PING=/bin/ping
ARG1=$1
ARG2=$2
WAKEHOST=$3
echo "$1 $2 $3" >> /tmp/wolping.log
function fwol {
TO_WAKEUP=$1
if /usr/bin/wget -O -
"http://wol.insite.cz/index.php?machine=$TO_WAKEUP" | grep -q "ERROR" ; then
echo "WOL failed"
WOL_RES="FAIL"
else
echo "WOL OK"
WOL_RES="OK"
fi
}
if ! $PING $ARG1 $ARG2 $WAKEHOST; then
fwol $WAKEHOST
if [ "$WOL_RES" = "FAIL" ]; then
exit 1
fi
sleep 5m
$PING $ARG1 $ARG2 $WAKEHOST || exit 1
fi
exit 0
Where the http://wol.insite.cz service running on our internal network
sends wakeonlan packet to $TO_WAKEUP machine (centralized DNS name - mac
address mapping)
This setup has been working ok for a few years.
Regards,
Pavel.
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|
|
|