Backup e restore di un client con amanda: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
==Configurazione Server==
Un server Debian Etch servername.domain.dom dove c'è già installato amanda configurato e funzionante, deve backuppare un client clientname.domain.dom


Configurare il server e testarlo per un corretto backup locale.
==Configurazione Client==
In particolare, il server locale dovrà essere dichiarato con il suo nome effettivo, NON localhost.


==CLIENT==
Installare amanda-client
sudo apt-get install amanda-client


Sistemare i servizi inetd:
Sistemare i servizi inetd:
Line 10: Line 10:
  sudoedit /etc/inetd.conf
  sudoedit /etc/inetd.conf


<pre>
amanda          dgram  udp    wait    backup  /usr/lib/amanda/amandad        amandad          -auth=bsd amdump amindexd amidxtaped
amanda          dgram  udp    wait    backup  /usr/lib/amanda/amandad        amandad          -auth=bsd amdump amindexd amidxtaped
amandaidx      stream  tcp    nowait  backup  /usr/lib/amanda/amindexd      amindexd -auth=bsd amdump amindexd amidxtaped
amandaidx      stream  tcp    nowait  backup  /usr/lib/amanda/amindexd      amindexd -auth=bsd amdump amindexd amidxtaped
amidxtape      stream  tcp    nowait  backup  /usr/lib/amanda/amidxtaped    amidxtaped      -auth=bsd amdump amindexd amidxtaped
amidxtape      stream  tcp    nowait  backup  /usr/lib/amanda/amidxtaped    amidxtaped      -auth=bsd amdump amindexd amidxtaped
</pre>


Riavviare inetd
Riavviare inetd
Line 20: Line 22:


  ...
  ...
  galmail.galimberti.priv         backup  amdump amindexd amidxtaped
  servername.domain.dom         backup  amdump amindexd amidxtaped
  ...
  ...


==SERVER==
==Configurazione Server==
 
Configurare il server e testarlo per un corretto backup locale.
 
In particolare, il server locale dovrà essere dichiarato con il suo nome effettivo, NON localhost.
 
Definire il backup da fare sul client in  /etc/amanda/DailySet1/disklist
Definire il backup da fare sul client in  /etc/amanda/DailySet1/disklist


  ...
  ...
  galmail         /      always-full
  clientname         /      always-full
  ...
  ...


==Configurazione Client==
Dal server testare se è tutto ok:
 
Installare amanda-client
sudo apt-get install amanda-client
 
Definire in /etc/amandahosts il nome del server che può accedere al client:
 
<pre>
...
galserver.galimberti.dom        backup@galserver.galimberti.dom
galserver.galimberti.dom        backup
galserver                      backup@galserver.galimberti.dom
galserver                      backup
</pre>


Dal server testare se è tutto ok:
sudo -u backup /usr/sbin/amcheck -c DailySet1 clientname


sudo -u backup /usr/sbin/amcheck DailySet1


==Restore del client==
==Restore del client==
Line 53: Line 46:
Dal client lanciare:
Dal client lanciare:


  sudo amrecover -s galserver -t galserver
  sudo amrecover -s servername -t servername


Scegliere l'host:
Scegliere l'host:
  sethost galmail
  sethost clientname


Scegliere il disco da cui restorare:
Scegliere il disco da cui restorare:

Revision as of 14:15, 14 January 2009

Un server Debian Etch servername.domain.dom dove c'è già installato amanda configurato e funzionante, deve backuppare un client clientname.domain.dom

Configurazione Client

Installare amanda-client

sudo apt-get install amanda-client

Sistemare i servizi inetd:

sudoedit /etc/inetd.conf
amanda          dgram   udp     wait    backup  /usr/lib/amanda/amandad        amandad          -auth=bsd amdump amindexd amidxtaped
amandaidx       stream  tcp     nowait  backup  /usr/lib/amanda/amindexd       amindexd -auth=bsd amdump amindexd amidxtaped
amidxtape       stream  tcp     nowait  backup  /usr/lib/amanda/amidxtaped     amidxtaped       -auth=bsd amdump amindexd amidxtaped

Riavviare inetd sudo invoke-rc.d openbsd-inetd restart

Aggiungere il nome del server ed i programmi in /etc/amandahosts:

...
servername.domain.dom         backup  amdump amindexd amidxtaped
...

Configurazione Server

Configurare il server e testarlo per un corretto backup locale.

In particolare, il server locale dovrà essere dichiarato con il suo nome effettivo, NON localhost.

Definire il backup da fare sul client in /etc/amanda/DailySet1/disklist

...
clientname         /       always-full
...

Dal server testare se è tutto ok:

sudo -u backup /usr/sbin/amcheck -c DailySet1 clientname


Restore del client

Dal client lanciare:

sudo amrecover -s servername -t servername

Scegliere l'host:

sethost clientname

Scegliere il disco da cui restorare:

setdisk /

Se non lo si conosce:

listdisk

Scegliere la data del backup da restorare:

setdate 2006-01-03

Se no la si conosce: history

Scegliere la dir di restore

lcd /tmp

Aggiungere ciò che si desidera restorare

add directory_o_file

Avviare il restore

extract