six demon bag

Wind, fire, all that kind of thing!

2015-12-31

Barracuda Backup Agent for Linux Unattended Installation

Barracuda Networks provide agents for their backup appliance for various operating systems. Unfortunately the Linux agent (unlike the Windows agent) does not come with an option for a silent installation, and it doesn't look like the vendor can be bothered to do anything about it.

Instead of being able specify a path on the commandline (or at least force a silent installaton to the default path) you're always prompted for the path where the agent should be installed:

/tmp # tar xzf barracuda_backup_agent-x.x.x.tar.gz
/tmp # cd barracuda_backup_agent-x.x.x
/tmp/barracuda_backup_agent-x.x.x # ./install
Please choose an installation path, or press enter for default.
[/usr/local/barracuda/bbs]: _

Which kinda sucks when you're trying to automate agent deployment. However, ps revealed that install apparently is just a launcher for the actual installer located in the subdirectory lin/$(uname -m):

~ # ps afx
...
 1437 tty1     Ss     0:00 /bin/login --     
 1445 tty1     S      0:00  \_ -bash
 1662 tty1     S+     0:00      \_ sh -c "/root/barracuda_backup_agent-5.4.08//lin/x86_64/bblincin"
 1663 tty1     Sl+    0:00          \_ /root/barracuda_backup_agent-5.4.08//lin/x86_64/bblincin
...

And unlike the launcher that program at least accepts input from STDIN, so you can specify the destination path by piping it into the program:

/tmp/barracuda_backup_agent-x.x.x # echo '/opt/bbagent' | ./lin/x86_64/bblincin

Please choose an installation path, or press enter for default.
[/usr/local/barracuda/bbs]: Installing to /opt/bbagent
Stopping process bblingin
Stopping process bblinagt
Removing service
Stopping process bblinsdr
Copying file /opt/bbagent/lin/x86_64/bblincin
Copying file bblincin
...
Copying file /opt/bbagent/config/bbfilter.ini
Copying file bbfilter.ini
Installing service
Starting service
Install Complete!

Unattended uninstallation works the same way, except that you pipe u instead of the destination path into the program:

echo 'u' | ./lin/x86_64/bblincin

Posted 01:13 [permalink]