Packaging Symantec NetBackup Client

sgrall-pfg
Contributor

Has anyone here tried packaging Symantec NetBackup client? The "installer" from Symantec is a bunch of interactive shell scripts. I've captured it with Composer, but I'm not sure that it will install correctly, given the complexity of the install. The official install scripts also store the client name somewhere, so I'm not sure if I can somehow build a scripted name change into a package.

Any insight from others is appreciated. I realize that there are other backup solutions out there, but I'm trying not to add a second backup solution. The company I'm consulting at is extremely particular.

1 REPLY 1

jackd
New Contributor

Hi Stephen,

I feel your pain with Symantec NetBackup Client. It is bash installer and a bunch of java.

I used Composer to make a custom package (non-flat) so we could call the script in a postfight script. Far as I can tell this will works on a Repository that is HFS+ and not NTFS. Non-flat packages don't execute from NTFS.

postflight.sh

#!/bin/sh
# <postflight.sh> - executes our first shell script in the tmp directory
#
/private/var/tmp/DublinNetBackupInstaller/DublinInstall.sh

DublinInstall.sh

#!/bin/sh
# <DublinInstall.sh> - NetBackup script for Dublin City Schools.
## by jd

BackupServerHost="backupmaster.dublinschools.net"
ADComputerName="$(dsconfigad -show|grep "Computer Account"|awk '{print $4}'|tr -d "$").dcs.dublinschools.net"

# Remove /usr/openv/netbackup/bp.conf so scrip always reset backup with correct computer account name from dsconfigad
rm /usr/openv/netbackup/bp.conf

# Execute expect script to populate the NetBackup install scripts information that is prompted
/usr/bin/expect -f /private/var/tmp/DublinNetBackupInstaller/install.exp $BackupServerHost $ADComputerName

echo "/Users/*/Library/Caches/*" >> /usr/openv/netbackup/exclude_list
echo "/Users/*/Movies/*" >> /usr/openv/netbackup/exclude_list
echo "/Users/*/Music/*" >> /usr/openv/netbackup/exclude_list
echo "/Users/*/.Trash/*" >> /usr/openv/netbackup/exclude_list
echo "/Users/1*" >> /usr/openv/netbackup/exclude_list
echo "/Users/2*" >> /usr/openv/netbackup/exclude_list
echo "/Users/*student*" >> /usr/openv/netbackup/exclude_list

exit 0      ## Success

We use the Active Directory DNS name when resolving the hostname. This way we can flush the policies out in NetBackup and import all the correct names from Active Directory. This is the tough past cause the client really doesn't report back to the backup master server.

install.exp

set timeout 20
#
## backup.exp - expect script that is excuted by DublinInstall.sh script
## passing 2 arguments (BackupServerHost, ADComputerName)
## by jd

# Start Netbackup 7.1.0.6
spawn /private/var/tmp/DublinNetBackupInstaller/install
set BackupServerHost [lindex $argv 0]
set ADComputerName [lindex $argv 1]

# Do you wish to continue? [y,n] (y)
expect "y)" 
send "y
"

# Do you want to install the NetBackup client software for this client? [y,n] (y)
expect "y)"
send "y
"

# Enter the name of the NetBackup server :
expect "Enter the name of the NetBackup server : "
send "$BackupServerHost
"

# name of the NetBackup client? [y,n] (y)
expect "y)"
send "n
"

#sleep 2
#
## Uses the Computer Account name that is binded to the Active Directory As:
## Enter the name of this NetBackup client :
expect "NetBackup client : "
send "$ADComputerName
"

interact

The expect script tries to answer those questions your getting.

Hope this helps...

Thanks
Jack

p.s. Note: that when the install finally does run it is going to spawn a bunch of sh processes. So even though it says its installed it might take a minute to really be installed :)