GSWA/Build a Basic Configuration

From wiki.zmanda.com
Revision as of 19:09, 1 January 2011 by Dustin (talk | contribs) (config and check)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Let's jump right in. Presumably you have Amanda-3.2.0 or higher installed already!

Setup

First, make some directories. You'll need to know your Amanda user, probably "amandabackup" or "amanda" or "backup", depending on how you installed Amanda. We'll use "amandabackup" here to avoid ambiguity. As root:

mkdir -p /amanda /etc/amanda
chown amandabackup /amanda /etc/amanda

and as the Amanda user:

mkdir -p /amanda/vtapes/slot{1,2,3,4}
mkdir -p /amanda/holding
mkdir -p /amanda/state/{curinfo,log,index,gnutar-listdir}
mkdir -p /etc/amanda/MyConfig

All of the data will be under /amanda to stress that there is no system-specific place to put them. Of course, in the end, you can put them wherever you'd like!

Now, add an amanda.conf(5) file at /etc/amanda/MyConfig/amanda.conf with the following contents. Note that you should edit dumpuser appropriately if your Amanda user has another name.

org "MyConfig"
infofile "/amanda/state/curinfo"
logdir "/amanda/state/log"
indexdir "/amanda/state/index"

tpchanger "chg-disk:/amanda/vtapes"
labelstr "MyData[0-9][0-9]"
tapecycle 4
autolabel "MyData%%" EMPTY VOLUME_ERROR
amrecover_changer "changer"

tapetype "TEST-TAPE"
define tapetype TEST-TAPE {
  length 100 mbytes
  filemark 4 kbytes
}

define dumptype global {
    auth "local"
}

define dumptype simple-gnutar {
    global
    compress none
    program "GNUTAR"
}

holdingdisk hd1 {
    directory "/amanda/holding"
    use 50 mbytes
    chunksize 1 mbyte
}

Next, add a disklist(5) with a single disk list entry (DLE). This is /etc/amanda/MyConfig/disklist:

localhost /etc simple-gnutar

That's it.

Check

Amanda has a nice utility called amcheck(8) which can check a configuration for you. Running it on the test configuration should give something like the following. Note that almost all Amanda commands take the configuration name ("MyConfig" in this case) as the first argument.

 $ amcheck MyConfig
Amanda Tape Server Host Check
-----------------------------
NOTE: tapelist will be created on the next run.
Holding disk /amanda/holding: 868352 kB disk space available, using 51200 kB as requested
slot 1: contains an empty volume
Will write label 'MyData01' to new volume in slot 1.
NOTE: skipping tape-writable test
NOTE: host info dir /amanda/state/curinfo/localhost does not exist
NOTE: it will be created on the next run.
NOTE: index dir /amanda/state/index/localhost does not exist
NOTE: it will be created on the next run.
Server check took 0.276 seconds

Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 7.089 seconds.  0 problems found.

(brought to you by Amanda 3.2.1)