Amanda runs as a daemon on the Mac so that it’s available, but not using much in the way of resources while it’s waiting for the server to request the next backup. I had a nice opportunity to learn about how Leopard handles these daemons and that is detailed below…. but first a few notes about Amanda on Macs.
Compile it – Ouch… we have to compile it to make it run. There is not simple installer.
Native Tools – Backups are accomplished using native tool. Meaning, the compression, and transport/copy tools on OS X are going to be used. This is important because Non-native applications have a devil of a time preserving the extended ACLs.
Version Specific Notes – Leopard is pretty good, but Tiger and Panther are reported to have defective TAR applications that do not preserve ACLs properly. There is a nice application called ‘backup bouncer’ written by a grad student to force Apple to fix these bugs…. and the result is clean functionality in Leopard.
INSTALLING THE CLIENT – PREREQUISITES
Before installing you are going to need to download and install xcode from Apple’s web site. This includes a compiler that you really need. When done installing xcode install the glib2 package with this command:
sudo port install glib2
You will either have to reboot after the xcode install or re-source your path. Rebooting is easier to describe
INSTALLING THE CLIENT – DO IT!!!
First create the amandabackup user and group and set the password.
sudo dscl localhost -create /Local/Default/Users/amandabackup
sudo dscl localhost -create /Local/Default/Users/amandabackup RecordName amandabackup
sudo dscl localhost -create /Local/Default/Users/amandabackup UserShell /bin/bash
sudo dscl localhost -create /Local/Default/Users/amandabackup RealName “Backup User”
sudo dscl localhost -create /Local/Default/Users/amandabackup UniqueID 5000
sudo dscl localhost -create /Local/Default/Users/amandabackup PrimaryGroupID 0
sudo dscl localhost -append /Local/Default/Groups/admin GroupMembership amandabackup
sudo dscl localhost -create /Local/Default/Users/amandabackup NFSHomeDirectory /Users/amandabackup
sudo ditto -rsrcFork ‘/System/Library/User Template/English.lproj/’ /Users/amandabackup
sudo sh -c “echo ‘amandabackup_server.example.com amandabackup’ > /Users/amandabackup/.amandahosts”
sudo chown -R amandabackup:wheel /Users/amandabackup
sudo passwd amandabackup
Download the source code and expand it with the tar -zxvf amanda.tar.gz command. Then in the directory run the following:
# Configure it with bsdtcp transport
sudo ./configure –with-user=amandabackup \
–with-group=admin –with-bsdtcp-security \
# Make it and install it
sudo make install
It’s now installed, but the daemon is not running yet. You need to add a plist to the LaunchDaemon. That Plist entry below should be placed in the file /Library/LaunchDaemons/org.amanda.amandad.bsdtcp.plist
Good… every time you reboot the daemon will launch and be ready. But just now it’s still not running. Let’s launch it:
sudo launchctl load -w /Library/LaunchDaemons/org.amanda.amandad.bsdtcp.plist
CHECK OUR WORK
You know it’s running with netstat shows 10080 listening.
$ netstat -na | grep 10080
tcp6 0 0 *.10080 *.* LISTEN
tcp4 0 0 *.10080 *.* LISTEN
The real test is to work from the server and noop your Mac.
amservice mac.domainname.com bsdtcp noop