SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Shutdown
Author Message
Post Shutdown 
I'd like configure Bacula so that it turns off the computer after the SD has
finished writing the backup. I'm running Debian GNU/Linux and Bacula 2.0.3.
Is there a way to do that?

--
Virtual Bit di Lucio Crusca
via Isonzo, 5
10069 - Villar Perosa (TO)
http://virtualbit.sulweb.org

Post Shutdown 
Lucio Crusca a écrit :
I'd like configure Bacula so that it turns off the computer after the SD has
finished writing the backup. I'm running Debian GNU/Linux and Bacula 2.0.3.
Is there a way to do that?


RunAfterCmd ?

--
Adam CECILE Linbox / Free&ALter Soft
152 rue de Grigy tél: +33 3 87 50 87 95
Technopôle Metz 2000 fax: +33 3 87 75 19 26
57070 METZ - France http://www.linbox.com

Post Shutdown 
Hi,

On 6/4/2007 2:37 PM, Adam C=E9cile wrote:
Lucio Crusca a =E9crit :
I'd like configure Bacula so that it turns off the computer after the =
SD has=20
finished writing the backup. I'm running Debian GNU/Linux and Bacula 2=
=2E0.3.=20
Is there a way to do that?

=20
RunAfterCmd ?

Definitely... I use the following in my office:

Job {
Priority =3D 999
Name =3D Shutdown
Type =3D Admin
Run Before Job =3D "/etc/bacula/shutdown.sh"
Schedule =3D Shutdown
Messages =3D Standard
Storage =3D DLT
Fileset =3D Alles
Pool =3D Full
Client =3D goblin-fd
Max Start Delay =3D 20h
Rerun Failed Levels =3D No
}

Note the high priority value.

bacula/root < at > goblin /root # cat /etc/bacula/shutdown.sh
#!/bin/bash

if [ -f /var/bacula/server/allowshutdown ] ; then
echo "Shutdown will take place..."
/var/bacula/server/sched_downtime goblin "`date -d "now + 5 min" \
"+%Y-%m-%d %H:%M:%S"`" "`date "-d tomorrow 8:12"`" 1 0 0 bacula \
"goblin turns off until tomorrow morning..."
/sbin/shutdown -h -t 120 +6 &
else
echo "Shutdown will not happen (/var/bacula/server/allowshutdown=20
not present)"
fi
exit 0

Most of the stuff in the script is for Nagios integration and you can=20
safely ignore it... so your "Run Before Job" line could also simply be=20
"/sbin/shutdown -h -t 120 +6 &" (I'm unsure about the & for background=20
execution - at least it's better to have the shutdown in the background=20
so Bacula can correctly finish the job and won't have a running job left =

in the catalog.)

Arno

Arno
--=20
IT-Service Lehmann al < at > it...
Arno Lehmann http://www.its-lehmann.de

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB