Installazione e configurazione Amanda su Debian: Difference between revisions
m 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... |
mNo edit summary |
||
| Line 44: | Line 44: | ||
#changerfile "/etc/amanda/DailySet1/changer.conf" | #changerfile "/etc/amanda/DailySet1/changer.conf" | ||
#changerdev "/dev/null" | #changerdev "/dev/null" | ||
... | |||
infofile "/var/lib//amanda/DailySet1/curinfo" # database DIRECTORY | |||
logdir "/var/lib/amanda/DailySet1/logdir" # log directory | |||
indexdir "/var/lib/amanda/DailySet1/index" # index directory | |||
tapelist "/etc/amanda/DailySet1/tapelist" # list of used tapes | |||
</pre> | |||
*Creare le directory per il database, i log e quant'altro: | |||
<pre> | |||
sudo -u backup mkdir /var/lib/amanda/DailySet1 | |||
sudo -u backup mkdir /var/lib/amanda/DailySet1/logdir | |||
sudo -u backup mkdir /var/lib/amanda/DailySet1/curinfo | |||
sudo -u backup mkdir /var/lib/amanda/DailySet1/index | |||
</pre> | </pre> | ||
| Line 159: | Line 172: | ||
#server /bin always-full | #server /bin always-full | ||
server / always-full | server / always-full | ||
</pre> | |||
==Preparazione dell'Holding Disk== | |||
Per velocizzare ed ottimizzare la scrittura su nastro, utilizzare un [[Utilizzo degli holding disk in Amanda|holding disk]]. | |||
Testare: | |||
sudo -u backup amcheck -c -l DailySet1 | |||
<pre> | |||
Amanda Tape Server Host Check | |||
----------------------------- | |||
Holding disk /files/space/amanda-holding: 208263128 KB disk space available, using 206165976 KB | |||
</pre> | </pre> | ||
| Line 175: | Line 199: | ||
*Usare lo [Script per il labeling dei tape di amanda] | *Usare lo [Script per il labeling dei tape di amanda] | ||
*Ritestare: | |||
sudo -u backup amcheck DailySet1 | |||
==Backup di prova== | |||
*Impostare in disklist un job di backup di test: | |||
sudo cp /etc/amanda/DailySet1/disklist /etc/amanda/DailySet1/disklist.production | |||
sudoedit /etc/amanda/DailySet1/disklist | |||
server /usr/share always-full | |||
*Testare | |||
sudo -u backup amcheck -w DailySet1 | |||
* Lanciare il backup di test: | |||
sudo -u backup amdump DailySet1 | |||
Revision as of 13:46, 28 July 2009
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"
...
infofile "/var/lib//amanda/DailySet1/curinfo" # database DIRECTORY
logdir "/var/lib/amanda/DailySet1/logdir" # log directory
indexdir "/var/lib/amanda/DailySet1/index" # index directory
tapelist "/etc/amanda/DailySet1/tapelist" # list of used tapes
- Creare le directory per il database, i log e quant'altro:
sudo -u backup mkdir /var/lib/amanda/DailySet1 sudo -u backup mkdir /var/lib/amanda/DailySet1/logdir sudo -u backup mkdir /var/lib/amanda/DailySet1/curinfo sudo -u backup mkdir /var/lib/amanda/DailySet1/index
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
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
Preparazione dell'Holding Disk
Per velocizzare ed ottimizzare la scrittura su nastro, utilizzare un holding disk.
Testare:
sudo -u backup amcheck -c -l DailySet1
Amanda Tape Server Host Check ----------------------------- Holding disk /files/space/amanda-holding: 208263128 KB disk space available, using 206165976 KB
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]
- Ritestare:
sudo -u backup amcheck DailySet1
Backup di prova
- Impostare in disklist un job di backup di test:
sudo cp /etc/amanda/DailySet1/disklist /etc/amanda/DailySet1/disklist.production sudoedit /etc/amanda/DailySet1/disklist
server /usr/share always-full
- Testare
sudo -u backup amcheck -w DailySet1
- Lanciare il backup di test:
sudo -u backup amdump DailySet1