How To:Customize MacOS X Amanda Packages

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)

Jump to: navigation, search

This article is a part of the How Tos collection.

We found it was just too difficult to create reasonably portable Mac packages for Amanda. If you're interested in the scripts we created to do this, please contact Zmanda - we're happy to share!

The MacOS X packages, as shipped, are easily customized for site-specific installation needs, without recompilation.

To open up a package (a .pkg file) for modification, right click on it and select "Show Package Contents".



The first requirement for any site is likely that amandahosts be configured to list the correct amanda server.

Inside the package, in the "Contents/Resources" directory, you will find a file named "amandahosts". Simply edit this file to match your site's needs, save, and install the resulting package wherever you like. The package scripts will take care of setting the correct permissions on the file.

Extra Configuration

If you have any other configuration that you wish to install alongside the binaries, add that configuration to a tarball named , rooted at the root of the filesystem, and install that tarball in the "Contents/Resources" directory. For example, if you would like to add an "amanda-client.conf", do the following in Terminal:

mkdir -p /tmp/overlay
cd /tmp/overlay
mkdir -p private/etc/amanda/
touch private/etc/amanda/amanda-client.conf
open -a /Applications/ private/etc/amanda/amanda-client.conf
# (edit to your heart's content)
sudo chown -R root:wheel /tmp/overlay
sudo tar -C /tmp/user_overlay -zcf /tmp/overlay.tgz .
sudo chown $(id -u) /tmp/user_overlay.tgz

then copy /tmp/user_overlay.tgz into the "Contents/Resources" directory, and install the resulting package wherever you like.


Except for the installation of the Amanda binaries and supporting files under /usr/local, the Amanda installers are driven by shell scripts located in the "Contents/Resources" directory. The scripts are relatively straightforward to read and modify; for example, you may want to change the mechanism by which the 'amandabackup' user is created in the preinstall script.


As with any experimental software, test the package in a safe environment before deploying it. If you enocounter any unexpected behavior, consult the Installer log (Command-L) for error messages. If you need help, see

Personal tools