Hello,
Andrei Mikhailovsky wrote:
Hello
after reading the manuals, I couldn't find a solution to my question. Is
it somehow possible to skip higher priority jobs and move to the lower
once if the client with a higher priority is not available.
No, that's not possible.
Even canceling the jobs is not helpful because the cancel command still
needs to wait for the client to time-out.
For
instance, I have a few clients that switch between Linux and Winblows
(for games, etc.) and I only need to backup their Linux files. When this
happens, bacula waits until the client is available i.e. when the
computer is booted back to Linux, which might take a few days or so. So
in that situation, I have a bunch of clients with lower priorities
sitting without a backup. Is there an option that allows to skip the
clients that do not have a running bacula-fd? So that if the client is
not running linux it will skip that job and move on to the other
clients?
The option is a run before script.
I'm using a script which pings the host and tries to connect to the ssh
port to determine if the host is up and is running linux. If not, it
exits with an error code, and the director fails the backup.
====== checkos.sh ======
#!/bin/bash
#
# checkos.sh
#
# checks which OS is running on a computer
#
usage() {
echo "usage: $0 address < UP | win | linux >"
echo " Arguments are: IP-Address or hostname and OS to check for"
echo " This program is quite stupid:"
echo " It only checks if a host is up, and if it has port 22 open
(ssh),"
echo " the OS is assumed to be linux, otherwise Windows"
echo " Result is in return code: 0 is yes, 1 is no or error."
echo "(C) Arno Lehmann 2004"
echo "No warranties, but you are free to use, modify and distribute"
echo "this script provided you don't remove this copyright notice."
echo "For questions or improvements you may contact the author at"
echo "[EMAIL PROTECTED]"
echo
exit 1
}
ADR=$1
OS=$2
if test $# -lt 2 ; then
usage
fi
case $OS in
UP)
;;
win)
;;
linux)
;;
*)
usage
;;
esac
if test $# -gt 2 ; then
echo "Doing $3..."
fi
if ( ping -q -c 3 -w 4 $ADR 2>&1 >/dev/null ); then
if test $OS = "UP" ; then
echo "Host $ADR is up."
exit 0
fi
echo "Host $ADR is up. Telnetting..."
telnet $ADR 22 </dev/null 2>&1 | grep -q "Connection closed"
RC=$?
echo "RC of telnet to port 22 is $RC"
case $OS in
win)
if test $RC -eq 0 ; then
echo "This has SSH and is NOT Windows."
exit 1
else
echo "This has NOT SSH and IS Windows."
exit 0
fi
;;
linux)
echo "Just taking telnet's result..."
exit $RC
;;
*)
exit 1;
;;
esac
else
echo "Host $ADR is DOWN!"
exit 1
fi
====== script ends ======
Hope this helps,
Arno
Many thanks
--
Andrei
--
IT-Service Lehmann [EMAIL PROTECTED]
Arno Lehmann http://www.its-lehmann.de
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users