Bacula Backup – Easily Upgrade Linux / Unix based Client from Shell Script

Bacula® – The Open Source Network Backup Solution

Bacula is one of the best Client/Server based backup program available, open source (free) or commercial. It is not, however, the easiest to configure!

For those of us who still like to compile code, especially code for utilities that are generally not incorporated into OS releases, such as Bacula, here is a very simple way to do it:
mkdir /usr/src/bacula
cd /usr/src/bacula
create file with an editor (I use vi you may use nano or any text editor you prefer), here are the contents:

for i in cat servers.lst; do
echo $i;
ssh $i “mkdir -p /usr/src/bacula; rm -f /usr/src/bacula-5.2.6.tar.gz”;
scp bacula-5.2.6.tar.gz $i:/usr/src/bacula;
ssh $i “tar xvfz /usr/src/bacula/bacula-5.2.6.tar.gz -C /usr/src/bacula”;
ssh $i “cd /usr/src/bacula/bacula-5.2.6; ./configure –enable-client-only; mak
e install; service bacula-fd restart”;
ssh $i “rm -rf /usr/src/bacula/bacula*”;

Make sure you have servers that you can ssh to as root without a password entered into servers.lst. I use one that looks something like:
… (etc)

./ [ENTER]

Watch and make sure compilations and restarts work successfully. Test one of the clients (perhaps an incremental on one that usually finishes quickly) to make sure it is working correctly. Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *