You are on page 1of 18

Amanda in 15 Minutes

Abstract
Amanda is the most popular open source backup and recovery software in the
world because of its openness, robustness, functionality and scalability. Yet it is
very easy to set up and maintain in production. This article illustrates how, in
about 15 minutes, you can:
Install and confiure an Amanda backup server.
!repare three different client machines "#$%# 11, &edora 1', and
(indows )!* for backup.
#et backup parameters.
+erify the confiuration.
+erify backup and restore.
,evision: 1.-
Table of Contents
1 The Problem .................................................................................................................................3
2 The Challenge ..............................................................................................................................3
3 The Solution: Amanda .................................................................................................................3
3.1 Installation Prerequisites ......................................................................................................5
4 Installing the Amanda Ba!u" Ser#er .........................................................................................$
5 Installing the Amanda Clients ......................................................................................................%
5.1 Installing Amanda Client &P' on Iron ()edora 13* ............................................................%
5.2 Installing Amanda Client &P' on Co""er (S+,S 11* ........................................................-
5.3 Installing Amanda Client on .ranium (/indo0s 1P* ........................................................2
$ Con3iguring the Ba!u" Ser#er ...................................................................................................2
$.1 Con3iguring the Ser#er .......................................................................................................14
$.2 Adding Client Iron ()edora 13* ..........................................................................................11
$.3 Adding Client Co""er (S+,S 11* ......................................................................................11
$.4 Adding Client .ranium (/indo0s 1P* .............................................................................12
% 5eri3iation and Ba!u" ............................................................................................................13
- &eo#er6 ....................................................................................................................................14
-.1 &eo#er6 o3 +inu7 lient (Co""er* ....................................................................................14
-.2 &eo#er6 o3 8/C lient (.ranium* ...................................................................................1$
2 Conlusion .................................................................................................................................1%
14 &equest 3or )eedba! ...............................................................................................................1%
11 9lossar6 ...................................................................................................................................1-
Page 2 o3 1-
1 The Problem
Toda6:s businesses rarel6 run on ;ust one o"erating s6stem. +inu7 users and administrators o3ten
ha#e strong "re3erenes 3or one distribution o#er another< 0eb designers might lean to0ards the
'a< and lega6 so3t0are and hard0are ma6 require #arious .=I1 o"erating s6stems. >et<
des"ite the om"le7it6 o3 modern business om"uting en#ironments< a s6stem administrator is
e7"eted to 3ind a reliable ba!u" solution.
'an6 enter"rises e7"et users to !ee" im"ortant 3iles on net0or!ed resoures< both 3or sharing
and to ba! them u". ?thers e7"et to ba! u" des!to" mahines and la"to"s. /ith the "rie o3
hard dis! storage ontinuousl6 3alling< toda6 it is ommon to ha#e terab6tes o3 storage and
orres"onding amounts o3 data that an be lost
1
. )urthermore< 0e li#e in a global and e@
ommere eonom6< 0here businesses run around the lo! and ruial business data is
onstantl6 hanging. In this en#ironment< it is more ritial than e#er to ha#e a reliable ba!u"
s6stem in "lae.
2 The Challenge
)or our 15@minute hallenge< 0e 0ant to ba!u" t0o +inu7 s6stems (eah running a di33erent
+inu7 distribution* < and one /indo0s 1P s6stem. /e use onl6 3reel6 a#ailable o"en soure
so3t0are.
?ur senario is as 3ollo0s:
The user Sunil 0or!s 0ith sensiti#e in3ormation. /e need to ma!e a ba!u" o3 his home
diretor6< /home/sunil< 0hih resides on a +inu7 s6stem alled Iron< running )edora 13. ?ur
0ebmaster needs to ba!u" the /srv/www/htdocs/ diretor6 on the 0ebser#er< Copper<
running S.S, +inu7 ,nter"rise Ser#er 11 (S+,S 11*. ?ur manager 0or!s solel6 on a /indo0s
1P s6stem alled Uranium< and !ee"s all o3 his 0or! in a 3older alled C:AData.
Bere is a summar6 o3 our on3iguration:
Client Filesystem OS Compression?
Co""er /srv/www/htdocs/ S+,S 11 >es
Iron /home/sunil )edora 13 >es
.ranium C:\Data /indo0s 1P >es
The CCom"ressionDE olumn re3ers to 0hether that lient should om"ress the data rather than
the ser#er (or e#en the ta"e dri#e*.
3 The Solution: Amanda
Amanda is o"en@soure ba!u" so3t0are that is 3le7ible< seure and salable in d6nami
om"uting en#ironments. Amanda an sa#e 6ou 3rom e7"ensi#e "ro"rietar6 ba!u" so3t0are and
3rom those ustom ba!u" sri"ts that donFt sale and ha#e a "ro"ensit6 to brea! at the 0orst
times. Gating ba! to 1221< Amanda has been used suess3ull6 in en#ironments 3rom one
1 HGata e7"ands to 3ill the s"ae a#ailable 3or storageH is a s"eial ase o3 Par!inson:s +a0 0hih dates ba!
deades.
Page 3 o3 1-
standalone mahine to hundreds o3 lients. Amanda is so thoroughl6 doumented< 3rom
ommunit6 0i!is to "ublished s6stem administration te7ts< that it might be hard to disern ;ust
ho0 eas6 an Amanda ba!u" an be.
This artile 0ill sho0 6ou ho0< in about 15 minutes< 6ou an:
1. Install and on3igure the Amanda ba!u" ser#er.
2. Install and on3igure the three di33erent lients 3or ba!u".
3. Set ba!u" "arameters.
4. 5eri36 the on3iguration.
5. Per3orm a ba!u".
$. &eo#er some 3iles 3rom a ba!u".
/e 0ill install and on3igure Amanda ba!u" ser#er so3t0are on a mahine running &ed Bat
,nter"rise +inu7 5 named Quartz. The Amanda Ser#er so3t0are manages the ba!u" data< the
ba!u" shedule< and stores the ba!u"s on media. /e 0ill install and on3igure Amanda ba!u"
lient so3t0are on Copper and on Iron. The /indo0s 1P lient< Uranium< 0ill be ba!ed u"
using 8manda /indo0s Client Communit6 ,dition (8/C*.
It is good "ratie to ba! u" ritial "ortions o3 the ba!u" ser#er as 0ell as lients. /e don:t
sho0 a ba!u" on the ser#er. It is ;ust another +inu7 lient to Amanda. Adding a suitable ba!u"
on Quartz 0ill be le3t as an e7erise.
Com"ression is a#ailable on amanda ser#ers and lients. >ou ma6 s"ei36 the om"ression tool
on .ni7 lients and ser#ers. The 8manda /indo0s Client uses 8IP om"ression< 0hih is
om"atible 0ith "!Ii"< 0inIi" and other lassi /indo0s arhi#al tools. Client side om"ression
o33ers t0o ad#antages:
Page 4 o3 1-
Illustration 1: Backup Schematic
+ess data to send o#er the net0or!< so 3aster ba!u"s.
Beause o3 Amanda:s "arallelism< 6ou don:t ha#e the ba!u" ser#er om"ressing se#eral
dum"s simultaneousl6< 0hih relie#es the ba!u" ser#er onsiderabl6.
?n the other hand< om"ression on the lient ma6 use u" resoures (CP. and memor6* on the
lient. Ge"ending on the relati#e resoures o3 the lient and ser#er< it ma6 be o"timal to
om"ress on the ser#er rather than the lient.
3.1 Installation Prerequisites
There are t0o om"onents to Amanda< the lient and the ser#er. Install one< the other or both as
required. The basi Amanda setu" onsists o3 an Amanda ser#er< the Amanda lients to be
ba!ed u"< and the storage media on 0hih the ba!u" data 0ill be stored< suh as ta"e or hard
dis!.
/e an also use an intermediate storage area alled a holding disk 3or ahing the data. A
holding dis! "ro#ides these !e6 bene3its:
It allo0s data to be streamed to media at 3ull s"eed< "re#enting ta"e bu33er under@runs and
shoe@shining o3 ta"es.
It an at as a hedge against media 3ailure. Gata is 3irst ba!ed@u" to the holding dis!< and
then later s"ooled to media 0hen it is a#ailable.
It gi#es 6ou dum" "arallelism. /ith a holding dis!< Amanda an do more at the same
time< s"eeding things u". It an build se#eral dum"s simultaneousl6 on the holding dis!
0hile o"6ing one to ta"e. Changing a ta"e doesn:t mean sto""ing the ba!u"s.
It is a good "ratie to inlude a holding dis! as a "art o3 e#en a minimal setu".
>ou ma6 0ant to ta!e a loo! at the Introdution to Amanda. This 0ill gi#e 6ou some
understanding o3 the ad#antages o3 using Amanda< the ommunit6 around Amanda< and the
resoures a#ailable to 6ou.
Be3ore 0e begin< "lease note the 3ollo0ing "rerequisites. Their installation< on3iguration and
use are be6ond the so"e o3 this artile.
1. tar 1.15 or later and 7inetd are required 3or .ni7 lients< so the6 must be installed on
Quartz< Iron and Copper.
2. Quartz 0ill send out email re"orts o3 eah ba!u" run< so it must be able to send mail to
the root user. An6 mail trans"ort agent ('TA* 0ill do.
3. The s6stems should all be on the same net0or! and a#ailable.
4. /e 0ill need general root aess as 0ell as remote root aess through SSB to .=I1 and
+inu7 lients. ,nsure that SSB is enabled< "assed through the 3ire0alls< and 0or!ing. /e
0ill use on3iguration ommands o#er SSB later.
5. Geal 0ith 3ire0all issues. Clients must allo0 TCP "orts 144-4 through 144-3 inlusi#e
3rom the ba!u" ser#er through their 3ire0alls
$. Giretories to be ba!ed u" must e7ist.
Page 5 o3 1-
>ou an get 3ree Amanda binar6 and soure &P' "a!ages< and soure tarballs 3rom
htt":JJ000.amanda.orgJdo0nload."h". >ou an get the binar6 o3 8manda /indo0s Client
(8/C* Communit6 ,dition 3or 3ree 3rom htt":JJ000.Imanda.omJdo0nload@amanda."h". >our
+inu7 distribution re"ositories ma6 ha#e amanda "a!ages< but those ma6 not be the most reent
and ma6 not ontain some o3 the utilit6 sri"ts 0e sho0 here. /e reommend the most reent
#ersion< so 0e 0ill install those.
Go0nload as 3ollo0s:
1. The Amanda ba!u" ser#er &P' "a!age onto Quartz.
2. The Amanda lient &P' onto Iron and Copper. ?n Iron< i3 there is no &P' 3or )edora
13< get that 3or 12.
3. The 8/C lient onto Uranium.
Also note that this artile assumes a 3resh install o3 Amanda. I3 6ou ha#e an e7isting Amanda
installation< additional ste"s are needed to ensure the "ro"er u"grade to the latest Amanda release
(3.1.4 and later*.
/hile this artile sho0s using Amanda 3.1.4< 0e reommend the latest #ersions
1
. The latest
#ersion o3 the /indo0s lient ma6 not agree e7atl6 0ith the +inu7 ser#er. .suall6 lients 0ill
0or! ;ust 3ine 0ith an Amanda ser#er #ersion o3 similar #ersion number. )or additional details
about 8/C lient installation "lease re3er to the Amanda /i!i. The messages on 6our sreen
0ill be similar to 0hat 0e sho0 belo0. To onser#e "a"er and band0idth< 0e ha#e omitted a lot
o3 the installation out"ut.
Note: >ou an install Amanda on a host that had a "re#ious installation o3 Amanda. In that
e#ent< 6ou 0ill see messages indiating that the user amandabackup alread6 e7ists and that 6ou
should he! ertain "ro"erties. This is generall6 not a "roblem.
4 Installing the Amanda ac!u" Ser#er
1. +og in as root on Quartz< the &ed Bat ,nter"rise +inu7 5 ser#er.
2. Install the Amanda ba!u" ser#er &P'. As a "art o3 the installation a user named
amandabackup is reated 0ho belongs to the grou" disk. /e use yum to he! 3or and
install de"endenies.
[root@quartz ~]# yum --no!chec" install amanda-#ac"u!$server-
%&'&(-)&rhel*&i%+,&r!m
-oaded !luins: .astestmirror
-oadin mirror s!eeds .rom cached host.ile
/ addons: u!dates&interwor0&in.o
/ #ase: mirrors&adams&net
/ e0tras: mirrors&adams&net
/ u!dates: mirrors&easynews&com
1ettin u! 2nstall 3rocess
40aminin amanda-#ac"u!$server-%&'&(-)&rhel*&i%+,&r!m: amanda-
#ac"u!$server-%&'&(-)&rhel*&i%+,
1 As o3 this 0riting< the latest is 3.1.4.
Page $ o3 1-
5
6eed enter!rise level su!!ort .or 7manda8 9!rade to 7manda
4nter!rise 4dition: htt!://www&zmanda&com/amanda-enter!rise-
edition&html
:un '' )('( ',:'*:)%: ;;; 7manda #ac"u! server installation
com!lete& ;;;
7manda installation lo can #e .ound in
</var/lo/amanda/install&lo< and errors =i. any> in
</var/lo/amanda/install&err<&
2nstalled:
amanda-#ac"u!$server&i%+, (:%&'&(-)&rhel*
Com!lete?
[root@quartz ~]#
3. As root set a "ass0ord 3or user amandabackup on Quartz
[root@quartz]# !asswd amanda#ac"u!
Chanin !assword .or user amanda#ac"u!&
6ew 962@ !assword:
Aety!e new 962@ !assword:
!asswd: all authentication to"ens u!dated success.ully&
4. +ater< 6ou ma6 0ish to ba! u" Quartz or to reo#er 3iles on Quartz. In 3at later on 0e
0ill reo#er some data on Quartz. To reo#er on a +inu7 lient< 6ou must 3irst s"ei36
the ta"e de#ie on the ser#er to use. In eah +inu7 lients 0e hange the 3ile
/etc/amanda/amanda-client&con.. Change this line:
ta!edev Bta!e:/dev/CD9A-E734-D4F2C4-G4A4B # your ta!e device
to this:
ta!edev B.ile://data/amanda/vta!e/Daily1et'B # your ta!e device
5 Installing the Amanda Clients
5.1 Installing Amanda Client RPM on Iron (Fedora 13)
1. +og in as root on Iron.
2. Install the Amanda ba!u" lient &P'. /e use yum to he! 3or and install
de"endenies< in this ase 7inetd. As a "art o3 the installation a user named
amandabackup is reated 0ho belongs to the grou" disk.
[root@iron ~]# yum --no!chec" install amanda-#ac"u!$client-%&'&(-
'&.c')&i,+,&r!m
-oaded !luins: !restoH re.resh-!ac"ae"it
1ettin u! 2nstall 3rocess
40aminin amanda-#ac"u!$client-%&'&(-'&.c')&i,+,&r!m: amanda-
#ac"u!$client-%&'&(-'&.c')&i,+,
Page % o3 1-
5
2nstalled:
amanda-#ac"u!$client&i,+, (:%&'&(-'&.c')
De!endency 2nstalled:
0inetd&i,+, ):)&%&'I-%(&.c'%
Com!lete?
[root@iron ~]#
3. As root set "ass0ord 3or user amandabackup on Iron
[root@iron]# !asswd amanda#ac"u!
Chanin !assword .or user amanda#ac"u!&
6ew 962@ !assword:
Aety!e new 962@ !assword:
!asswd: all authentication to"ens u!dated success.ully&
4. To reo#er on a +inu7 lient< 6ou must 3irst s"ei36 the ta"e de#ie on the ser#er to use.
In eah +inu7 lients 0e hange the 3ile /etc/amanda/amanda-client&con..
Change this line:
ta!edev Bta!e:/dev/CD9A-E734-D4F2C4-G4A4B # your ta!e device
to this:
ta!edev B.ile://data/amanda/vta!e/Daily1et'B # your ta!e device
5.2 Installing Amanda Client RPM on Copper (S!S 11)
1. +og in as the root user on Copper< 6our S.S, +inu7 ,nter"rise Ser#er 11 lient.
2. 9et the lient &P'.
3. Install the Amanda ba!u" lient &P'. As a "art o3 the installation a user named
amandabackup is reated 0ho belongs to the grou" disk.
co!!er:~ # r!m -ivh amanda-#ac"u!$client-%&'&(-)&sles''&i*+,&r!m
3re!arin&&&
########################################### ['((J]
:un 'K )('( 'I:I+:%I: 3re!arin to install: 7manda Community 4dition
- version %&'&(
:un 'K )('( 'I:I+:%I: Chec"in .or <amanda#ac"u!< user&&&
:un 'K )('( 'I:I+:%I:
:un 'K )('( 'I:I+:%I: Ehe <amanda#ac"u!L user account has #een
success.ully created&
:un 'K )('( 'I:I+:%I: MurthermoreH the account has #een
automatically loc"ed .or you
:un 'K )('( 'I:I+:%I: .or security !ur!oses& Dnce a !assword .or
the <amanda#ac"u!<
:un 'K )('( 'I:I+:%I: account has #een setH the user can #e
unloc"ed #y issuin
Page - o3 1-
5
6eed enter!rise level su!!ort .or 7manda8 9!rade to 7manda
4nter!rise 4dition: htt!://www&zmanda&com/amanda-enter!rise-
edition&html
:un 'K )('( 'I:I+:I%: 1ettin ownershi! and !ermissions .or
</var/li#/amanda/&!ro.ile<
:un 'K )('( 'I:I+:II: ;;; 7manda #ac"u! client installation
com!lete& ;;;
7manda installation lo can #e .ound in
</var/lo/amanda/install&lo< and errors =i. any> in
</var/lo/amanda/install&err<&
co!!er:~ #
4. As root set "ass0ord 3or user amandabackup on Copper
co!!er:~ # !asswd amanda#ac"u!
Chanin !assword .or amanda#ac"u!&
6ew 3assword:
Aeenter 6ew 3assword:
3assword chaned&
5. To reo#er on a +inu7 lient< 6ou must 3irst s"ei36 the ta"e de#ie on the ser#er to use.
In eah +inu7 lients 0e hange the 3ile /etc/amanda/amanda-client&con..
Change this line:
ta!edev Bta!e:/dev/CD9A-E734-D4F2C4-G4A4B # your ta!e device
to this:
ta!edev B.ile://data/amanda/vta!e/Daily1et'B # your ta!e device
5.3 Installing Amanda Client on "ranium (#indo$s %P)
1. =a#igate to the diretor6 0here 6ou do0nloaded the Amanda Client "a!age.
2. Gouble li! on the 3ile< e.g.: NOC-Community-%&'&#eta-%)#it&zi!. Then li!
on Ce7trat all 3ilesE. Cli! on C?KE< then on C=e7tE.
3. Cli! on the ne0l6 reated diretor6< e.g.: NOC-Community-%&'&#eta-%)#it.
Gouble@li! the setu!&e0e to install the /indo0s lient.
$ Configuring the ac!u" Ser#er
Amanda:s quantum unit o3 ba!u" is the disk list entry< or DLE. G+,s are entered into one or
more on3igurations. /e 0ill build three G+,s< one 3or eah mahine 0e ba! u". A mahine
an ha#e multi"le G+,s< but G+,s do not s"an om"uters. /e 0ill build one on3iguration. B6
ustom< Amanda e7am"les use the on3iguration Gail6Set1.
Should 6ou e#er need to edit the on3iguration< its 3iles are usuall6 3ound in
/etc/amanda/Daily1et'/. )or e7am"le< later on 0e 0ill add t0o dumptypes to our
on3iguration so that 0e an use the 8manda /indo0s Client.
Page 2 o3 1-
&.1 Con'iguring t(e Ser)er
/e 0ill s"ei36 a number o3 "arameters on the ommand line. There is more on these in the 0i!i
and in the man "age 3or amservercon.i. There are other o"tions< but the de3aults 0ill do
;ust 3ine 3or no0. There is a brie3 desri"tion o3 the "arameters 0e set initiall6 in the 9lossar6< on
"age 1-.
/e 0ill ba! u" all our lients to Quartz in the /data diretor6. ,nsure that 0e are logged@in
to Quartz as user root.
1. Create a diretor6 3or our #ta"es< and set its o0nershi" and "ermissions:
[root@quartz ~]# m"dir -! /data/amanda/vta!e/Daily1et'
[root@quartz ~]# chown amanda#ac"u!:dis"
/data/amanda/vta!e/Daily1et'
[root@quartz ~]# chmod -A K*( /data/amanda/vta!e/Daily1et'
2. Change to the amandabackup user:
[root@quartz ~]# su P amanda#ac"u!
3. As amandabackup user< run amservercon.i to reate a #ta"e on3iguration:
-sh-%&)Q amservercon.i Daily1et' --tem!late harddis" --ta!edev
/data/amanda/vta!e/Daily1et' --mailto root@localhost --dum!cycle
'wee" --runs!ercycle * --ta!ecycle ') --runta!es '
-oin to /var/lo/amanda/amservercon.i&)('((,)''%')'+&de#u
/etc/amanda/tem!late&d directory created
/var/li#/amanda/nutar-lists directory e0ists
/etc/amanda/Daily1et'/advanced&con. created and u!dated
curin.o and inde0 directory created
ta!elist .ile created
dis"list .ile created
Creatin custom con.iuration usin tem!lates
custom amanda&con. created
creatin vta!e directory
amla#el vta!es
chaner is reset
/var/li#/amanda/e0am!le/0inetd&amandaserver contains the latest
7manda server daemon con.iuration&
3lease mere it to /etc/0inetd&d/amandaserver&
/var/li#/amanda/&ssh/client$authorized$"eys created& 3lease a!!end
to /var/li#/amanda/&ssh/authorized$"eys .ile on 7manda clients
DD64&
=ote the reation o3 SSB !e6s< use3ul 3or ba!u"s o#er SSB. It is u" to 6ou to manuall6
(and seurel6* add the "ubli !e6 to the lient amandabackup user:s
authorized$"eys 3ile.
Page 14 o3 1-
&.2 Adding Client Iron (Fedora 13)
.se amaddlient to enable ba!u"s o3 lient iron:
-sh-%&)Q amaddclient --con.i Daily1et' --client iron&e0am!le&com
--dis"dev /home/sunil --dum!ty!e com!-user-tar
-oin to /var/lo/amanda/amaddclient&)('((,)''%%%(K&de#u
/etc/amanda/Daily1et'/dis"list u!dated
u!datin /var/li#/amanda/&amandahosts on quartz&e0am!le&com
7ttem!tin to u!date /var/li#/amanda/&amandahosts on
iron&e0am!le&com
&amandahosts '((J K, (&'RS/s
((:((
&amandahosts&tm! '((J '') (&'RS/s
((:((
iron&e0am!le&com:/var/li#/amanda/&amandahosts u!dated success.ully
Creatin amanda-client&con. .or iron&e0am!le&com
Creatin /etc/amanda/Daily1et' on iron&e0am!le&com
amanda-client&con.-iron&e0am!le&com '((J %+(
(&IRS/s ((:((
Co!y /var/li#/amanda/amanda-client&con.-iron&e0am!le&com to
iron&e0am!le&com success.ully
Mile /var/li#/amanda/e0am!le/0inetd&amandaclient contains the latest
7manda client daemon con.iuration&
3lease mere it to /etc/0inetd&d/amandaclient&
&.3 Adding Client Copper (S!S 11)
.se amaddclient to enable ba!u"s o3 lient copper:
-sh-%&)Q amaddclient --con.i Daily1et' --client co!!er&e0am!le&com
--dis"dev /srv/www/htdocs/ --dum!ty!e com!-user-tar
-oin to /var/lo/amanda/amaddclient&)('((,))')(*',&de#u
/etc/amanda/Daily1et'/dis"list u!dated
u!datin /var/li#/amanda/&amandahosts on quartz&e0am!le&com
7ttem!tin to u!date /var/li#/amanda/&amandahosts on
co!!er&e0am!le&com
&amandahosts '((J K, (&'RS/s
((:((
&amandahosts&tm! '((J '') (&'RS/s
((:((
co!!er&e0am!le&com:/var/li#/amanda/&amandahosts u!dated success.ully
Creatin amanda-client&con. .or co!!er&e0am!le&com
Creatin /etc/amanda/Daily1et' on co!!er&e0am!le&com
amanda-client&con.-co!!er&e0am!le&com '((J %+(
(&IRS/s ((:((
Co!y /var/li#/amanda/amanda-client&con.-co!!er&e0am!le&com to
co!!er&e0am!le&com success.ully
Page 11 o3 1-
Mile /var/li#/amanda/e0am!le/0inetd&amandaclient contains the latest
7manda client daemon con.iuration&
3lease mere it to /etc/0inetd&d/amandaclient&
&.* Adding Client "ranium (#indo$s %P)
.se amaddclient to enable ba!u"s o3 the /indo0s 1P lient (8/C* Uranium:
1. Be3ore running amaddclient< a""end the 3ollo0ing dum"t6"e de3initions to the 3ile
/etc/amanda/tem!late&d/dum!ty!es. These de3initions are needed to ba!u"
8/C lients.
de.ine dum!ty!e zwc-normal T
lo#al
!roram BD9U3B
V
de.ine dum!ty!e zwc-com!ress T
lo#al
com!ress client .ast
!roram BD9U3B
V
2. &un amaddclient 3or Uranium. >ou 0ill notie se#eral error messages indiating
that our user does not ha#e SSB aess to Uranium. 'ost o3 the time< this is "robabl6 a
good idea. )or no0 it means amaddclient annot o"6 an 7inetd on3iguration 3ile
and an Amanda lient on3iguration 3ile onto Uranium 3or us. .suall6< the 3allba! is 3or
us to o"6 them manuall6< as the error message indiates. Bo0e#er< Uranium is a
/indo0s mahine< and doesn:t run 7inetd. The 8manda lient handles the issues 3or us.
So 0e an ignore the error.
-#ash-%&((Q amaddclient --con.i Daily1et' --client
uranium&zmanda&com --dis"dev C:/Data --dum!ty!e zwc-com!ress
-oin to /var/lo/amanda/amaddclient&)((+(+'%(W*I((&de#u
/etc/amanda/Daily1et'/dis"list u!dated
u!datin /var/li#/amanda/&amandahosts on quartz&zmanda&com
/var/li#/amanda/&amandahosts contains uranium&zmanda&com rootH .ile
not u!dated
7ttem!tin to u!date /var/li#/amanda/&amandahosts on
uranium&zmanda&com
ssh: connect to host uranium&zmanda&com !ort )): Connection re.used
O7A626X: sc! .rom uranium&zmanda&com not success.ul&
Chec" uranium&zmanda&com :/var/li#/amanda/&amandahosts .ile&
2. entry <quartz&zmanda&com amanda#ac"u!< is not !resentH
a!!end the entry to the .ile manually&
Creatin amanda-client&con. .or uranium&zmanda&com
Creatin /etc/amanda/Daily1et' on uranium&zmanda&com
ssh: connect to host uranium&zmanda&com !ort )): Connection re.used
O7A626X: Cannot create /etc/amanda/Daily1et' on uranium&zmanda&com
Page 12 o3 1-
3lease co!y /var/li#/amanda/amanda-client&con.-uranium&zmanda&com
to uranium&zmanda&com manually
Mile /var/li#/amanda/e0am!le/0inetd&amandaclient contains the latest
7manda client daemon con.iuration&
3lease mere it to /etc/0inetd&d/amandaclient&
% &erification and ac!u"
/e 0ill test the ba!u" on3iguration 3or all three lients and then !i!@o33 a ba!u" run. ,nsure
that 0e are logged@in to LuartI as user amandabackup.
1. As amandabackup< run the amchec" ommand to test #alidit6 o3 the on3iguration and
onneti#it6 bet0een lient and ser#er
-sh-%&)Q amchec" Daily1et'
7manda Ea!e 1erver Gost Chec"
-----------------------------
slot ': volume <Daily1et'-'<
Oill write to volume <Daily1et'-'< in slot '&
6DE4: s"i!!in ta!e-writa#le test
6DE4: host in.o dir /etc/amanda/Daily1et'/curin.o/iron&e0am!le&com
does not e0ist
6DE4: it will #e created on the ne0t run&
6DE4: inde0 dir /etc/amanda/Daily1et'/inde0/iron&e0am!le&com does
not e0ist
6DE4: it will #e created on the ne0t run&
6DE4: host in.o dir /etc/amanda/Daily1et'/curin.o/co!!er&e0am!le&com
does not e0ist
6DE4: it will #e created on the ne0t run&
6DE4: inde0 dir /etc/amanda/Daily1et'/inde0/co!!er&e0am!le&com does
not e0ist
6DE4: it will #e created on the ne0t run&
6DE4: host in.o dir
/etc/amanda/Daily1et'/curin.o/uranium&e0am!le&com does not e0ist
6DE4: it will #e created on the ne0t run&
6DE4: inde0 dir /etc/amanda/Daily1et'/inde0/uranium&e0am!le&com does
not e0ist
6DE4: it will #e created on the ne0t run& 1erver chec" too" )&''+
seconds
7manda Sac"u! Client Gosts Chec"
--------------------------------
Client chec": ) hosts chec"ed in K&I(( seconds& ( !ro#lems .ound&
=#rouht to you #y 7manda %&'&(>
2. The amchec" ommand should not generate an6 errors. The =?T, messages 0e see
here are normal 3or G+,s that ha#e not 6et been ba!ed u". I3 0e see the e7"eted C4
"roblems 3oundE result< 0e an no0 initiate the 3irst 3ull ba!u":
Page 13 o3 1-
[amanda#ac"u!@quartz ~]Q amdum! Daily1et'
3. ?ne the ba!u" run is om"lete< the root user should reei#e an e@mail 0ith the ba!u"
summar6 on the Amanda ser#er.
4. /e an no0 reate a ron ;ob 3or user amandabackup that 0ill e7eute amdum" and
initiate the ba!u"s automatiall6. ,7eute the rontab ommand to reate the ;ob:
[amanda#ac"u!@quartz ~]Q cronta# Pe
and add this line to the 3ile to run ba!u"s dail6 'onda6 through )rida6 at 1 A':
( ' / / '-* /usr/s#in/amdum! Daily1et'
' (eco#er)
)inall6< 0e 0ill "er3orm a reo#er6 o3 some o3 the data 0e ha#e ba!ed@u". This is a ruial ste"
M al0a6s #eri36 a ba!u" s6stem to on3irm that 6ou an reo#er data.
The reo#er6 "roedure 3or 0indo0s lient is di33erent 3rom that 3or a +inu7 lient. 8/C
Communit6 ,dition does not 6et su""ort diret restore on a lient. Instead< 3irst restore data on
6our Amanda ser#er (or another lient*< and then o"6 it to the lient.
+.1 Re,o)er- o' inu. ,lient (Copper)
1. ?n the host Copper< as the user root< run amrecover to initiate the data reo#er6
"roess. Bere 0e reo#er to a tem"orar6 diretor6. An6 em"t6 diretor6 0ill do.
co!!er:~/tm!/amanda # amrecover Daily1et'
7UA4CDF4A Fersion %&'&(& Contactin server on quartz&e0am!le&com &&&
))( quartz 7U76D7 inde0 server =%&'&(> ready&
1ettin restore date to today =)('(-(,-))>
)(( Oor"in date set to )('(-(,-))&
)(( Con.i set to Daily1et'&
*(' Gost co!!er is not in your dis"list&
Eryin host co!!er&e0am!le&com &&&
)(( Dum! host set to co!!er&e0am!le&com&
9se the setdis" command to choose dum! dis" to recover
2. The list o3 ommands belo0 0ill demonstrate a reo#er6 o3 a set o3 di33erent 3iles and
diretories to the HJtm"H diretor6.
amrecoverY listdis"
)((- -ist o. dis" .or host co!!er&e0am!le&com
)('- /srv/www/htdocs/
)(( -ist o. dis" .or host co!!er&e0am!le&com
amrecoverY setdis" /srv/www/htdocs/
)(( Dis" set to /srv/www/htdocs/&
amrecoverY ls
)('(-(,-))-'I-'I-%' ro#ots&t0t
)('(-(,-))-'I-'I-%' inde0&html
)('(-(,-))-'I-'I-%' .avicon&ico
Page 14 o3 1-
)('(-(,-))-'I-'I-%' a!ache$!#))$ani&i.
)('(-(,-))-'I-'I-%' a!ache$!#))&!n
)('(-(,-))-'I-'I-%' a!ache$!#))&i.
)('(-(,-))-'I-'I-%' a!ache$!#&!n
)('(-(,-))-'I-'I-%' a!ache$!#&i.
)('(-(,-))-'I-'I-%' &
amrecoverY add /
7dded .ile /ro#ots&t0t
7dded .ile /inde0&html
7dded .ile /.avicon&ico
7dded .ile /a!ache$!#))$ani&i.
7dded .ile /a!ache$!#))&!n
7dded .ile /a!ache$!#))&i.
7dded .ile /a!ache$!#&!n
7dded .ile /a!ache$!#&i.
amrecoverY e0tract
40tractin .iles usin ta!e drive .ile://data/amanda/vta!e/Daily1et'
on host quartz&e0am!le&com&
Ehe .ollowin ta!es are needed: Daily1et'-'
40tractin .iles usin ta!e drive .ile://data/amanda/vta!e/Daily1et'
on host quartz&e0am!le&com&
-oad ta!e Daily1et'-' now
Continue [8/C/n/s/d]8
Aestorin .iles into directory /root/tm!/amanda
7ll e0istin .iles in /root/tm!/amanda can #e deleted
Continue [8/C/n]8 y
&/a!ache$!#&i.
&/a!ache$!#&!n
&/a!ache$!#))&i.
&/a!ache$!#))&!n
&/a!ache$!#))$ani&i.
&/.avicon&ico
&/inde0&html
&/ro#ots&t0t
amrecoverY e0it
)(( Xood #ye&
=ote that in the listing in amrecover< the dates are those o3 the ba!u"< not neessaril6
those o3 the underl6ing 3iles.
3. /e an no0 #eri36 that the 3iles ha#e been reo#ered suess3ull6 b6 running tree<
.ind< ls -A< or an6 other suitable ommand.
co!!er:~/tm!/amanda # ll -A
total I(
drw0r-0r-0 ) root root I(W, )('(-(,-)) 'I:** &
Page 15 o3 1-
drw0r-0r-0 % root root I(W, )('(-(,-)) 'I:*% &&
-rw-r--r-- ' root root ))(* )((*-')-'I (W:)* a!ache$!#))$ani&i.
-rw-r--r-- ' root root )I'( )((*-')-'I (W:)* a!ache$!#))&i.
-rw-r--r-- ' root root '*() )((*-')-'I (W:)* a!ache$!#))&!n
-rw-r--r-- ' root root )%), )((I-''-)( '%:', a!ache$!#&i.
-rw-r--r-- ' root root '%+* )((I-''-)( '%:', a!ache$!#&!n
-rw-r--r-- ' root root %() )((+-(K-)% '(:(+ .avicon&ico
-rw-r--r-- ' root root II )((I-''-)( '%:', inde0&html
-rw-r--r-- ' root root ), )('(-(*-(* (+:I% ro#ots&t0t
+.2 Re,o)er- o' /#C ,lient ("ranium)
The "roedure to reo#er ba!u" o3 0indo0s lient Uranium is as 3ollo0s.
1. +og in as root on quartz< the Amanda Ser#er< and reate a diretor6< 0here 6ou 0ill
restore the data. 'a!e user amandabackup the o0ner o3 the diretor6.
[root@quartz amanda]# m"dir /restore
[root@quartz amanda]# chown amanda#ac"u!:dis" /restore/
2. As user amandabackup on3irm the t6"e o3 ba!u" that 6ou 0ant to restore using the
ommand amadmin. In our ase 0e 0ill be restoring a 3ull and an inremental ba!u"<
both dated dated 13 August 244-. S6nta7 3or amadmin is amadmin
ZSac"u!1et6ameY .ind ZhostnameY Zdis"Y
[root@quartz amanda]# su - amanda#ac"u!
-sh-%&)Q amadmin Daily1et' .ind uranium
date host dis" lv ta!e or .ile .ile !art stat
)('(-(,-)) 'I:'I:%' uranium BC:/DataB ( Daily1et'-' ' '/' DR
3. Change diretor6 to Jrestore
-sh-%&)Q cd /restore/
4. .se am.etchdum! to e7trat the ontents 3rom 3ull ba!u" (244-@4-@13
14:23:4%*.S6nta7 o3 the ommand is am.etchdum! ZSac"u!1et6ameY
ZclientY Zdis"Y ZCCCCUUDDGGUU11Y
sh-%&)Q am.etchdum! Daily1et' uranium BC:/DataB )('((,))'I'I%'
' volume=s> needed .or restoration
Ehe .ollowin volumes are needed: Daily1et'-'
3ress enter when ready
am.etchdum!: ': restorin s!lit dum!.ile: date )('((,))'I'I%' host
uranium dis" BC:/DataB !art '/96R6DO6 lev ( com! 6 !roram !"zi!
5. =o0 6ou an see the data set in /restore.
-sh-%&)Q ls
uranium&C$$Data&)('((,))'I'I%'&(
Page 1$ o3 1-
-sh-%&)Q .ile uranium&C$$Data&)('((,))'I'I%'&(
uranium&C$$Data&)('((,))'I'I%'&(: Ni! archive dataH at least v)&( to
e0tract
$. >ou an test the 3ile loall6.
-sh-%&)Q unzi! -t uranium&C$$Data&)('((,))'I'I%'&(
7rchive: uranium&C$$Data&)('((,))'I'I%'&(
testin: NOCSac"u!2n.o
error: invalid com!ressed data to in.late
testin: NOC-Community-%&'&#eta-%)#it&zi! DR
7t least one error was detected in uranium&C$$Data&)('((,))'I'I%'&(&
The error on NOCSac"u!2n.o is normal< and 0ill not a33et 6our abilit6 to e7trat the
"a6load.
%. 'o#e the 3ile to the /indo0s s6stem 0here 6ou 0ant to restore and e7trat the data
using Com"ressed )olders utilit6 in /indo0s 1P or "rograms suh as /inIi" or P!Ii".
?r 6ou an e7trat it loall6 0ith unzi!.
[root@quartz restore]# unzi! uranium&C$$Data&)('((,))'I'I%'&(
7rchive: uranium&C$$Data&)('((,))'I'I%'&(
s"i!!in: NOCSac"u!2n.o volume la#el
in.latin: NOC-Community-%&'&#eta-%)#it&zi!
=ote the di33erene in the t0o reo#er6 lients. am.etchddum! reo#ers a om"lete dum" as a
Ii" 3ile 0hile amrecover e7trats 3iles 3rom the storage medium. .se am.etchdum! 0here
6ou ma6 ha#e o0nershi" or "ermissions issues. )or e7am"le< 0e might use am.etchdum! to
reo#er our /indo0s mahines beause /indo0s and +inu7 ha#e di33erent "ermissions
shemes.
=ote also that Amanda uses o"erating s6stem utilities (tar< dum"< Ii"< et.* to reate the dum"sN
this means 6ou are not de"endent on "ro"rietar6 "rograms to reo#er 6our data.
=ote 0ell the im"liations 3or seurit6: 0ith "ro"er (or im"ro"erO* aess "ermissions< an6one
an reo#er data 3or an6 lient on an6 other lient.
* Conclusion
As 0e ha#e ;ust seen< ba!ing@u" and restoring 3iles 0ith Amanda is inredibl6 eas6. Setu" is
also #er6 qui!. )or more in3ormation< there is a 0ealth o3 doumentation and e7am"les
a#ailable on the Amanda /i!i. There is also a large ommunit6 read6 to res"ond to ideas and
requests 3or hel" on the Amanda )orums. As 6ou e7"lore the 3eatures and 3le7ibilit6 o3 Amanda<
6ou 0ill 3ind that there is muh more "o0er to be harnessed 3rom building 6our ba!u" and
reo#er6 solution around Amanda.
1+ (e,uest for -eedbac!
Gid this "a"er hel" 6ou in 6our on3igurationD /hat did 0e not o#er 0ellD /hat ould 0e ha#e
done betterD Please "ro#ide 3eedba! on this "a"er to ommunit6PImanda.om. >our 3eedba!<
ho0e#er brie3< is #er6 muh a""reiated.
Page 1% o3 1-
11 .lossar)
DLE: Gis! +ist ,ntr6< the quantum unit o3 Amanda ba!u".
dumpcycle: The number o3 da6s in the ba!u" 6le< 0hether 6ou run ba!u"s on all o3 those
da6s or not. ,ah G+, 0ill be ba!ed u" in its entiret6 at least one during this "eriod.
S"ei36 "er G+, in amanda&con..
dumptype: A de3inition o3 a dum". It s"ei3ies 0hether the lient or ser#er 0ill om"ress or
enr6"t the dum" (and 0ith 0hih "rogram*< 0hat e7lusions to a""l6 (e.g. e7luding a
"a!age ahe under /var*< and other harateristis.
holding disk: an intermediate storage area 3or ahing ba!u" data. S"ei36 "er G+, in
amanda&con..
mailto: ?ne or more email addresses to send re"orts to. S"ei36 "er G+, in amanda&con..
runspercycle: Bo0 man6 dum"s "er 6le. In our e7am"le (see Setion $< Con3iguring the
Ba!u" Ser#er< on "age 2*< 0e ha#e a dum" 6le o3 a 0ee!< but onl6 3i#e runs "er 0ee!.
+ater< 0e 0ill set this u" as a ron ;ob to run 'onda6 through )rida6 (see Setion %<
5eri3iation and Ba!u"< on "age 13*. S"ei36 "er G+, in amanda&con..
runtapes: The ma7imum number o3 ta"es "er a single run. >ou an s"an ta"es (use multi"le
ta"es "er run* 0ith this "arameter< but 0e are going to !ee" our alulations sim"le b6
ignoring that a"abilit6. S"ei36 "er G+, in amanda&con..
tapecycle: Bo0 man6 ta"es 0e 0ill ha#e. /ith "h6sial ta"es< o3 ourse< a "h6sial ount is
the ma7imum. /ith #irtual ta"es< 0e an hange this ount on the 3l6 aording to dis!
usage. /e 0ill run 3i#e dum"s a 0ee!. /ith 12 ta"es< 0e !ee" a 0ee! o3 old ba!u"s in
reser#e< and still ha#e t0o s"ares. The reser#e 0ee! ensures that 0e al0a6s ha#e at least
one 3ull ba!u" 3or eah G+, on hand. S"ares are more im"ortant 3or "h6sial ta"es< but
it:s good "ratie to ha#e them e#en 0ith #irtual ta"es. S"ei36 "er G+, in
amanda&con..
tapedev: The atual ba!u" de#ie. =ormall6 this is a ta"e dri#e< e.g. /dev/st(L in this
ase a diretor6 0e 0ill build. S"ei36 "er G+, in amanda&con..
template: S"ei36 the t6"e o3 ba!u" medium< in this ase #irtual ta"es on a hard dri#e.
S"ei36 "er G+, in amanda&con..
Page 1- o3 1-

You might also like