Sunday, September 2, 2012

How to setup a Remote Client to Amanda Backup


Install the amanda client RPM as below and include lot of configuration procedure as below.

# wget http://www.zmanda.com/downloads/community/Amanda/3.3.0/Redhat_Enterprise_5.0/amanda-backup_client-3.3.0-1.rhel5.x86_64.rpm

# rpm -ivh amanda-backup_client-3.3.0-1.rhel5.x86_64.rpm
Preparing...                ########################################### [100%]
Dec  2 2008 14:56:09: Preparing to install: Amanda Community Edition - version 2.5.2p1
Dec  2 2008 14:56:09: Checking for 'amandabackup' user...
Dec  2 2008 14:56:09:
Dec  2 2008 14:56:09:  The 'amandabackup; user account has been successfully created.
Dec  2 2008 14:56:09:  Furthermore, the account has been automatically locked for you
Dec  2 2008 14:56:09:  for security purposes.  Once a password for the  'amandabackup'
Dec  2 2008 14:56:09:  account has been set, the user can be unlocked by issuing
Dec  2 2008 14:56:09:  the following command as root.:
Dec  2 2008 14:56:09:
Dec  2 2008 14:56:09:  # passwd -u amandabackup
Dec  2 2008 14:56:09:
Dec  2 2008 14:56:09:  If this is not a new installation of Amanda and you have
Dec  2 2008 14:56:09:  pre-existing Amanda configurations in /etc/amanda
Dec  2 2008 14:56:09:  you should ensure that 'dumpuser' is set to 'amandabackup'
Dec  2 2008 14:56:09:  in those configurations.  Additionally, you should ensure
Dec  2 2008 14:56:09:  that /var/lib/amanda/.amandahosts on your client systems
Dec  2 2008 14:56:09:  is properly configured to allow connections for the user
Dec  2 2008 14:56:09:  'amandabackup'.
Dec  2 2008 14:56:09:
Dec  2 2008 14:56:09:
Dec  2 2008 14:56:09: === Amanda backup client installation started. ===
   1:amanda-backup_client   ########################################### [100%]
Dec  2 2008 14:56:10: Updating system library cache...done.
Dec  2 2008 14:56:10: Checking '/var/lib/amanda/.amandahosts' file.
Dec  2 2008 14:56:10: Checking for '/var/lib/amanda/.profile' and ensuring correct environment.
Dec  2 2008 14:56:10: Setting ownership and permissions for '/var/lib/amanda/.profile'
Dec  2 2008 14:56:10: Checking for '/var/lib/amanda/.profile' and ensuring correct environment.
Dec  2 2008 14:56:10: Setting ownership and permissions for '/var/lib/amanda/.profile'
Dec  2 2008 14:56:10: === Amanda backup client installation complete. ===
Amanda installation log can be found in '/var/log/amanda/install.log' and errors (if any) in '/var/log/amanda/install.err'.


On the client, add the amanda service by creating the xinetd conf file:

# vim /etc/xinetd.d/amanda


OLD udp method:

service amanda
{
       only_from       = my.backup.server.org
       socket_type     = dgram
       protocol        = udp
       wait            = yes
       user            = amandabackup
       group           = disk
       groups          = yes
       server          = /usr/lib/amanda/amandad
       server_args     = -auth=bsd amdump
       disable         = no
}


NEW tcp method:

service amanda
{
        disable         = no
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = amandabackup
        group           = disk
        groups          = yes
        server          = /usr/lib/amanda/amandad
        server_args     = -auth=bsdtcp amdump amindexd amidxtaped
}


and restart xinetd:

# service xinetd restart


Edit the iptables rules on the client to allow connections from the server

# vim /etc/sysconfig/iptables


Add the following lines before the default REJECT rule, substituting in the IP of your amanda backup server:

-A RH-Firewall-1-INPUT -s 192.168.1.100 -m tcp -p tcp --dport 10080 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.1.100 -m udp -p udp --dport 10080 -j ACCEPT


and restart the iptables firewall:

# service iptables restart


Add the backup server to the client .amandahosts file:

# vim ~amandabackup/.amandahosts


localhost   amandabackup amdump
localhost.localdomain   amandabackup amdump
backupserver.foo.net   amandabackup amdump


On the backup server, add a disklist entry for the client:

# vim /etc/amanda/MySet1/disklist


mybackupclient.foo.net   /home/bob     comp-user-tar


And finally, do a check on the server:

# su - amandabackup
$ amcheck MySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /dumps/amanda: 198686956 KB disk space available, using 198584556 KB
NOTE: host info dir /etc/amanda/MySet1/curinfo/mybackupclient.foo.net does not exist
NOTE: it will be created on the next run.
NOTE: index dir /etc/amanda/MySet1/index/mybackupclient.foo.net does not exist
NOTE: it will be created on the next run.
Server check took 0.005 seconds

Amanda Backup Client Hosts Check
--------------------------------
Client check: 2 hosts checked in 6.294 seconds, 0 problems found

(brought to you by Amanda 2.5.2p1)


If you get "ERROR: mybackupclient.foo.net: [can not read/write /etc/amandates: Permission denied]", you may have to allow selinux.

For furhter information visit the link http://wiki.zmanda.com/index.php/Quick_start#Backup_client_configuration

No comments:

Post a Comment