Installazione e configurazione Amanda su Debian

From RVM Wiki
Revision as of 10:06, 28 July 2009 by Gabriele.vivinetto (talk | contribs) (New page: == Installazione pacchetti == sudo apt-get install amanda-client amanda-common amanda-server Riavviare inetd: sudo invoke-rc.d openbsd-inetd restart ==Configurazione dell'accesso all...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installazione pacchetti

sudo apt-get install amanda-client amanda-common amanda-server

Riavviare inetd:

sudo invoke-rc.d openbsd-inetd restart

Configurazione dell'accesso alla macchina da backuppare

  • Se la macchina da backuppare è la stessa su cui si installa tutto, aggiungere la seguente riga, altrimenti il processo server di backup non riuscirà a collegarsi:
sudoedit /etc/amandahosts 
nomeserver.dominio.dom backup

Preparazione files di configurazione

Copiare il file di configurazione standard:

sudo mkdir /etc/amanda/DailySet1
zcat /usr/share/doc/amanda-common/examples/amanda.conf.gz | sudo tee /etc/amanda/DailySet1/amanda.conf > /dev/null
chown -R backup.backup /etc/amanda/

Modificare quanto segue

sudoedit /etc/amanda/DailySet1/amanda.conf
org "Customername"             # your organization name for reports
mailto "customer@domain.dom,cus-alert@rvmgroup.it" # space separated list of operators at your site

dumpcycle 4 weeks       # the number of days in the normal dump cycle
runspercycle 24         # the number of amdump runs in dumpcycle days
                        # 4 weeks * 6 amdump runs per week (Mon to Sat)
tapecycle 26 tapes      # the number of tapes in rotation
                        # 4 weeks (dumpcycle) times 6 tapes per week (Mon
                        # to Sat) plus a few to handle errors that
                        # need amflush and so we do not overwrite the full
                        # backups performed at the beginning of the previous
                        # cycle


tapedev "/dev/nst0"     # Linux @ tuck, important: norewinding
#tpchanger "chg-manual"          # the tape-changer glue script
#changerfile "/etc/amanda/DailySet1/changer.conf"
#changerdev "/dev/null"

Definizione del tipo di nastro

Bisogna definire un tipo nastro, da utilizzare poi nella configurazione.

Identificare il tape drive in uso:

# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 03 Lun: 00
  Vendor: HP       Model: C5683A           Rev: C104
  Type:   Sequential-Access                ANSI SCSI revision: 02

Verificare che non sia già esistente nel file di configurazione. Se non esiste, cercarlo nelle FAQ di amanda http://amanda.sourceforge.net/cgi-bin/fom?cmd=searchForm&file=1 oppure su google.

Esempi:

HP Dat 8i C1533A

4 Gb non compressi DDS2

define tapetype C1533A_120 {
    comment "HP C1533A DDS2 with 120m tapes"
    length 3858 mbytes
    filemark 107 kbytes
    speed 507 kbytes
}


HP Dat 40i C5683A

20 Gb non compressi DDS4

define tapetype HP-Dat-40-C5683A {
    comment "HP Surestore Dat40i C5683A"
    length 19560 mbytes
    filemark 1147 kbytes
    speed 2957 kps
} 


HP Dat 160

78 Gb non compressi DD6

define tapetype HP-DAT160 {
    comment "HP StorageWorks DAT 160)"
    length 78236 mbytes
    filemark 4461 kbytes
    speed 6272 kps
}

Mettere la definizione che interessa prima delle altre.

  • Inserire la definizione:
tapetype HP-Dat-40-C5683A


Definizione del Formato della Label per i nastri

Occorre definire un formato standard per verificare che il tape inserito sia effettivamente uno giusto.

Per standard utilizziamo il formato

A-01-MON

sudoedit /etc/amanada/DailySet1/amanda.conf

labelstr "^[A-Z]-0[0-5]-[MON|TUE|WED|THU|FRI|SAT]" # label constraint regex: all tapes must match

Definizione del tipo di Job di Backup

Occorre definire le caratteristiche del dumptype.

Utilizziamo un backup completo giornaliero che utilizzi il formato portabile tar compresso.

sudoedit /etc/amanada/DailySet1/amanda.conf

define dumptype always-full {
    comment "Full dump using tar with best software compression"
    program "GNUTAR"
    compress server best
    index
    priority high
    dumpcycle 0
}

Il dumptype sarà poi assegnato ad ogni disco in seguito.

Definizione dei dischi da backuppare

Occorre definire che dischi backuppare e in che modo.

sudoedit /etc/amanda/DailySet1/disklist
# File format is:
#       hostname mountpoint dumptype
# where the dumptypes are defined by you in amanda.conf.

#nomeserver mountpint dumptype
#server /bin always-full
server / always-full

Test della configurazione

  • Testare la configurazione:
sudo -u backup amcheck -c -l DailySet1

Darà vari errori, ma quello che interessa a noi è:

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

Etichettatura dei nastri

  • Usare lo [Script per il labeling dei tape di amanda]