Tuesday 16 August 2016

Amanda Backup Server & Client Configuration on Centos 7 Server::

Amanda Backup Server & Client Configuration on Centos 7 Server::
=================================================

Setting up Amanda Backup Server on Centos 7

Install EPEL repository
#yum install epel-release


Set up the hostname on Amanda Server
#nmtui
or
#hostnamectl set-hostname amanda-server
#vi /etc/hosts
ip address amanda-server amanda-server.centos.com

Update the Centos OS
#yum update

Install Amanda Server
#yum install amanda*

Install Add on Packages
# yum install xinetd gnuplot perl-ExtUtils-Embed

Start Xinetd Service
# service xinetd restart
# service xinetd status

Done Amanda Installation
# amadmin --version

 Amanda Configurations Setup

Make some directories
# mkdir -p /amanda /etc/amanda
# chown amandabackup /amanda /etc/amand

Now switch to your 'amandabackup' user
and run the following commands.
# su amandabackup
# mkdir -p /amanda/vtapes/slot{1,2,3,4}
# mkdir -p /amanda/holding
# mkdir -p /amanda/state/{curinfo,log,index}
# mkdir -p /etc/amanda/MyConfig

Edit Amanda.conf file
#vi /etc/amanda/MyConfig/amanda.conf

Add the following lines as such

org "MyConfig"
infofile "/amanda/state/curinfo"
logdir "/amanda/state/log"
indexdir "/amanda/state/index"
dumpuser "amandabackup"

tpchanger "chg-disk:/amanda/vtapes"
labelstr "MyData[0-9][0-9]"
autolabel "MyData%%" EMPTY VOLUME_ERROR
tapecycle 4
dumpcycle 3 days
amrecover_changer "changer"

tapetype "TEST-TAPE"
define tapetype TEST-TAPE {
length 100 mbytes
filemark 4 kbytes
}

define dumptype simple-gnutar-local {
auth "local"
compress none
program "GNUTAR"
}

holdingdisk hd1 {
directory "/amanda/holding"
use 50 mbytes
chunksize 1 mbyte
}

Now, we need to add a 'disklist' file with a single disk list entry (DLE). The 'disklist' file determines which disks will be backed up by Amanda. The file contains includefile directive or disklist entry. General usage was to describe a DLE as a partition, or file system.

#vi /etc/amanda/MyConfig/disklist
Type the following

localhost /etc simple-gnutar-local

Save and close the file

Check Amanda Configuration
# amcheck MyConfig

Run Test Backup
#amdump MyConfig
It will take some seconds but no output would be there

#echo $?

You will get "0" as output"

#amreport MyConfig

Amanda Backup Scheduling
#crontab -e

Type the following
0 17 * * * amandabackup /usr/sbin/amcheck -m MyConfig
15 2 * * * amandabackup /usr/sbin/amdump MyConfig

Exit from User
#exit

Amanda Backup Client Installation
# yum install amanda-client xinetd
# vi /var/lib/amanda/.amandahosts

 amanada_server amandabackup


Some of the Amanda Commands are as follows::
===============================
# amadmin --version
# amcheck -s all
# amcheck -c all
# amdump all
# amadmin all tape
# amflush -f all 
# amadmin all find ivie /usr/people | head -6 

No comments:

Post a Comment