Dear
all,
Any
ideas/assistance will be highly appreciated.
I have
backuppc server on Gentoo which works fine with regular client
backups. Now I am configuring wake-on-lan to wake windows
clients up before backup.
The
following has been done:
1. Bash
script has been a bit modified from the one suggested on this
forum (details of the current script are provided at the end
of the message).
2. Config.pl
has been modified on server as the following:
$Conf{PingPath} = '/usr/local/bin/wolping.sh';
$Conf{NmbLookupFindHostCmd} = ' ';
3. Appropriate
777 rights have been granted to wolping.sh. This is output of
ls –l:
-rwxrwxrwx 1 backuppc backuppc 1246 12:00
wolping.sh
4. I have
tested wolping.sh and it works great from terminal under
backuppc user
But
when I fire manual backup on any client which is in standby
mode, I got the following message: “2015-03-06 11:29:14 no
ping response”
Seems
that backuppc does not even fire the script as “logger” does not appear in tail -f
/var/log/messages
Could
you please advise what might cause such an issue
Many
thanks
wolping.sh:
----------------------------------------------------------------------
#!/bin/bash
#this
script is totally designed for the backuppc ping command
#which
is the first thing it does before it starts a backup
#this
is a substitute which pings the machine, if it is not
#awake
then it wakes it using a magic packet - using the wol.bsh
script
#then
pings again to make sure
PING=/bin/ping
ARG1=$1
ARG2=$2
ARG3=$3
ARG4=$4
WAKEHOST=$5
ETHWAKE="/sbin/ether-wake
-i enp3s0"
SLEEPTIME=3m
logger
"Backuppc pinging $1 $2 $3 $4
$5"
function
fwol {
TO_WAKEUP=$1
sudo $ETHWAKE $1
if [ $? -eq 0 ]
then
WOL_RES="OK"
else
WOL_RES="FAIL"
fi
}
$PING
$ARG1 $ARG2 $ARG3 $ARG4 $WAKEHOST >>/dev/null
2>&1
if [
$? -ne 0 ]; then
fwol $WAKEHOST
if [ "$WOL_RES" = "FAIL" ]; then
exit 1
fi
sleep $SLEEPTIME
$PING $ARG1 $ARG2 $WAKEHOST
if [ $? -eq 0 ]
then
logger "success waking $WAKEHOST."
else
logger "unable to wake $WAKEHOST."
exit 1
fi
else
$PING $ARG1 $ARG2 $ARG3 $ARG4 $WAKEHOST
fi
exit 0
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
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/