/Installation/OS Specific Notes/Installing Amanda on Mac OS X: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
No edit summary
 
(more progress)
Line 5: Line 5:
With Panther, the built-in <tt>tar</tt> does not record extended filesystem attributes (resource forks, finder flags, ACLs, and so on), so users who want to be able to restore those attributes will need to do some extra work (see below).  Fortunately, Tiger's <tt>tar</tt> does support extended attributes, so an amanda installation will work "out of the box".
With Panther, the built-in <tt>tar</tt> does not record extended filesystem attributes (resource forks, finder flags, ACLs, and so on), so users who want to be able to restore those attributes will need to do some extra work (see below).  Fortunately, Tiger's <tt>tar</tt> does support extended attributes, so an amanda installation will work "out of the box".


= Tiger =
This page is summarized from writeups by [https://webserver.brandeis.edu/pages/view/Bio/AmandaMacOSXCompileNotes Steven Karel] and [http://www.locnar.net/drupal/?q=node/16 Locnar] and [[User:Dustin|Dustin]]'s work on Amanda.


= Panther =
= General Setup =
(this section is summarized from writeups by [https://webserver.brandeis.edu/pages/view/Bio/AmandaMacOSXCompileNotes Steven Karel] and [http://www.locnar.net/drupal/?q=node/16 Locnar])
== Set Up 'amanda' User ==
The following steps use 'niutil' to set up Amanda in the netinfo database, and then creae a home directory for the new user.
sudo niutil -create / /users/amanda
sudo niutil -createprop / /users/amanda shell /bin/bash
sudo niutil -createprop / /users/amanda realname "Backup User"
sudo niutil -createprop / /users/amanda uid 5000
sudo niutil -createprop / /users/amanda gid 0
sudo niutil -createprop / /users/amanda home /Users/amanda
sudo ditto -rsrcFork '/System/Library/User Template/English.lproj/' /Users/amanda
sudo echo 'amanda_server.domain.com amanda' > /User/amanda/.amandahosts
sudo chown -R amanda.0 /Users/amanda
sudo passwd amanda
Replace <tt>amanda_server.domain.com</tt> in the above with the name of your amanda server.  This file is used as a basic security check to control which hosts can access <tt>amandad</tt> on this client.
 
= System Tweaks =
Add the following lines at the appropriate place in <tt>/etc/services</tt> (this isn't strictly necessary if you're not using kerberos security and the machine will only be an amanda client):
<pre>
kamanda        10081/tcp  # amanda backup services (Kerberos)
kamanda        10081/udp  # amanda backup services (Kerberos)
amandaidx      10082/tcp  # amanda backup services
amidxtape      10083/tcp  # amanda backup services
</pre>
 
Create <tt>/etc/amandates</tt>:
sudo touch /etc/amandates
sudo chmod 660 /etc/amandates
sudo chown -R amanda.wheel /etc/amandates
 
And set up some directories where Amanda can store small bits of data:
# TODO: get paths right for no --prefix
sudo mkdir -p /var/amanda
sudo mkdir -p /usr/lib/amanda
sudo touch /usr/lib/amanda/exclude.gtar
sudo mkdir /var/amanda/gnutar-lists
sudo chown -R amanda.wheel /usr/lib/amanda /var/amanda
 
= Compile Amanda =
Download and untar Amanda, then run <tt>./configure</tt> as follows:
./configure --with-user=amanda --with-group=wheel
You will want to examine <tt>./configure --help</tt> first to see what other options are available. For example:
; <tt>--without-server</tt>: just build the client components
; <tt>--prefix</tt>: install somewhere other than <tt>/usr/{bin,sbin,lib}</tt>, etc.
; <tt>--with-config</tt>: set the default configuration
; <tt>--with-gnutar</tt>: give the path to GNU tar (especially useful on Panther; see below)
Then follow the usual
make; make install
 
= Version-Specific Notes =
== Tiger ==
The above instructions should work without modification for Tiger.
 
== Panther ==


To support extended attributes on Panther,  
To support extended attributes on Panther,  
# install either [xtar http://www.helios.de/news/news03/N_06_03.phtml] or, if that doesn't work, [http://www.metaobject.com/downloads/macos-x/ hfstar]
# install either [xtar http://www.helios.de/news/news03/N_06_03.phtml] or, if that doesn't work, [http://www.metaobject.com/downloads/macos-x/ hfstar]
# compile Amanda as for Tiger, with the addition of the <tt>--with-gnutar=/path/to/new/tar</tt> flag to <tt>./configure</tt>, giving the location of the new tar
# compile Amanda, with the addition of the <tt>--with-gnutar=/path/to/new/tar</tt> flag to <tt>./configure</tt>, giving the location of the new tar


To run <tt>amandad</tt> on Panther, you need to install an xinetd configuration snippet; create <tt>/etc/xinet.d/amanda</tt> with the following contents:
To run <tt>amandad</tt> on Panther, you need to install an xinetd configuration snippet; create <tt>/etc/xinet.d/amanda</tt> with the following contents:

Revision as of 22:05, 8 March 2007

Work in Progress --Dustin 13:31, 8 March 2007 (PST)

Amanda has been tested to run on both Mac OS X Panther (10.3) and Tiger (10.4).

With Panther, the built-in tar does not record extended filesystem attributes (resource forks, finder flags, ACLs, and so on), so users who want to be able to restore those attributes will need to do some extra work (see below). Fortunately, Tiger's tar does support extended attributes, so an amanda installation will work "out of the box".

This page is summarized from writeups by Steven Karel and Locnar and Dustin's work on Amanda.

General Setup

Set Up 'amanda' User

The following steps use 'niutil' to set up Amanda in the netinfo database, and then creae a home directory for the new user.

sudo niutil -create / /users/amanda
sudo niutil -createprop / /users/amanda shell /bin/bash
sudo niutil -createprop / /users/amanda realname "Backup User"
sudo niutil -createprop / /users/amanda uid 5000
sudo niutil -createprop / /users/amanda gid 0
sudo niutil -createprop / /users/amanda home /Users/amanda
sudo ditto -rsrcFork '/System/Library/User Template/English.lproj/' /Users/amanda
sudo echo 'amanda_server.domain.com amanda' > /User/amanda/.amandahosts
sudo chown -R amanda.0 /Users/amanda
sudo passwd amanda

Replace amanda_server.domain.com in the above with the name of your amanda server. This file is used as a basic security check to control which hosts can access amandad on this client.

System Tweaks

Add the following lines at the appropriate place in /etc/services (this isn't strictly necessary if you're not using kerberos security and the machine will only be an amanda client):

kamanda         10081/tcp   # amanda backup services (Kerberos)
kamanda         10081/udp   # amanda backup services (Kerberos)
amandaidx       10082/tcp   # amanda backup services
amidxtape       10083/tcp   # amanda backup services

Create /etc/amandates:

sudo touch /etc/amandates
sudo chmod 660 /etc/amandates
sudo chown -R amanda.wheel /etc/amandates

And set up some directories where Amanda can store small bits of data:

# TODO: get paths right for no --prefix
sudo mkdir -p /var/amanda
sudo mkdir -p /usr/lib/amanda
sudo touch /usr/lib/amanda/exclude.gtar
sudo mkdir /var/amanda/gnutar-lists
sudo chown -R amanda.wheel /usr/lib/amanda /var/amanda

Compile Amanda

Download and untar Amanda, then run ./configure as follows:

./configure --with-user=amanda --with-group=wheel 

You will want to examine ./configure --help first to see what other options are available. For example:

--without-server
just build the client components
--prefix
install somewhere other than /usr/{bin,sbin,lib}, etc.
--with-config
set the default configuration
--with-gnutar
give the path to GNU tar (especially useful on Panther; see below)

Then follow the usual

make; make install

Version-Specific Notes

Tiger

The above instructions should work without modification for Tiger.

Panther

To support extended attributes on Panther,

  1. install either [xtar http://www.helios.de/news/news03/N_06_03.phtml] or, if that doesn't work, hfstar
  2. compile Amanda, with the addition of the --with-gnutar=/path/to/new/tar flag to ./configure, giving the location of the new tar

To run amandad on Panther, you need to install an xinetd configuration snippet; create /etc/xinet.d/amanda with the following contents:

service amanda
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = amanda
        server                  = /usr/local/libexec/amandad
        server_args             = amandad
        groups                  = yes
        disable                 = no
}

(where server is the path at which you've installed amandad)

If you have trouble, you may want to check that xinetd is running on the machine.

Links