How to Install Amanda - Automatic Network Backup Tool
To Install Advanced Automatic Network Backup Tool " Amanda" for Linux
Amanda- Advanced Maryland Automatic Network Disk Archiver is an open source recovery and backup tool. It is used for taking backup and archive computers from disk, cloud and tape. It was developed by " The University of Maryland" , Computer Science Department. Now it is hosted by SourceForge web based service. Installation of Amanda is explained in this tutorial.
Features
- It is based on Client-Server Model.
- This tool uses an Unique Scheduler to optimize network and storage usage.
- Follows automated data retention and deposition policy.
- Open Source Archiving Tool was written in Perl and C.
- Scheduled Backup is supported.
- It is available for most of the Linux Distributions.
- Windows Machine was Supported using Samba client.
- Zmanda developed a Commercial Enterprise called ' Amanda' .
- Zmanda includes Cloud Based Service, Management Console, Scheduler and Plugin framework.
- It support for tape-spanning.
- Amanda supports image backup.
- It will provide secure connection between server and client using OpenSSH.
- The Plugin framework supports applications such as Samba, Oracle Database, etc.
- The cloud based service works with Amazon s3.
- It will report detailed result, including errors through email.
- It will recover gracefully for errors.
- It support for Disk Drives as well as Tape for backup.
- Stable, robust and very configurable because of high quality code.
- It is available as Free Community Edition and also as an Enterprise Edition.
- It supports image backup.
To setup Backup server
Run the following command to install Amanda with its dependencies.
[root@linuxhelp ~]# yum install amanda* -y
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package amanda.x86_64 0:3.3.3-13.el7 will be installed
---> Package amanda-client.x86_64 0:3.3.3-13.el7 will be installed
---> Package amanda-libs.x86_64 0:3.3.3-13.el7 will be installed
.
.
.
perl-URI.noarch 0:1.60-9.el7 perl-WWW-RobotRules.noarch 0:6.02-5.el7
perl-XML-NamespaceSupport.noarch 0:1.11-10.el7 perl-XML-Parser.x86_64 0:2.41-10.el7
perl-XML-SAX.noarch 0:0.99-9.el7 perl-XML-SAX-Base.noarch 0:1.08-7.el7
perl-XML-Simple.noarch 0:2.20-5.el7 perl-libwww-perl.noarch 0:6.05-2.el7
Complete!
Then install the xinetd package and some additional packages.
[root@linuxhelp ~]# yum install xinetd gnuplot perl-ExtUtils-Embed -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Resolving Dependencies
--> Running transaction check
---> Package gnuplot.x86_64 0:4.6.2-3.el7 will be installed
--> Processing Dependency: gnuplot-common = 4.6.2-3.el7 for package: gnuplot-4.6.2-3.el7.x86_64
.
.
.
gdbm-devel.x86_64 0:1.10-8.el7 glibc-devel.x86_64 0:2.17-106.el7_2.6 glibc-headers.x86_64 0:2.17-106.el7_2.6
gnuplot-common.x86_64 0:4.6.2-3.el7 kernel-headers.x86_64 0:3.10.0-327.18.2.el7 libdb-devel.x86_64 0:5.3.21-19.el7
perl-ExtUtils-Install.noarch 0:1.58-286.el7 perl-ExtUtils-MakeMaker.noarch 0:6.68-3.el7 perl-ExtUtils-Manifest.noarch 0:1.61-244.el7
perl-ExtUtils-ParseXS.noarch 1:3.18-2.el7 perl-Test-Harness.noarch 0:3.28-3.el7 perl-devel.x86_64 4:5.16.3-286.el7
pyparsing.noarch 0:1.5.6-9.el7 systemtap-sdt-devel.x86_64 0:2.8-10.el7
Dependency Updated:
glibc.x86_64 0:2.17-106.el7_2.6 glibc-common.x86_64 0:2.17-106.el7_2.6 libdb.x86_64 0:5.3.21-19.el7 libdb-utils.x86_64 0:5.3.21-19.el7
Complete!
Now start and enable the xinetd service.
[root@linuxhelp ~]# systemctl start xinetd
[root@linuxhelp ~]# systemctl enable xinetd
Check the status of xinetd service.
[root@linuxhelp ~]# systemctl status xinetd
xinetd.service - Xinetd A Powerful Replacement For Inetd
Loaded: loaded (/usr/lib/systemd/system/xinetd.service enabled)
Active: active (running) since Mon 2016-05-23 11:54:25 IST 16s ago
Main PID: 12479 (xinetd)
CGroup: /system.slice/xinetd.service
??12479 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
May 23 11:54:25 linuxhelp xinetd[12479]: removing discard
May 23 11:54:25 linuxhelp xinetd[12479]: removing discard
May 23 11:54:25 linuxhelp xinetd[12479]: removing echo
May 23 11:54:25 linuxhelp xinetd[12479]: removing echo
May 23 11:54:25 linuxhelp xinetd[12479]: removing tcpmux
May 23 11:54:25 linuxhelp xinetd[12479]: removing time
May 23 11:54:25 linuxhelp xinetd[12479]: removing time
May 23 11:54:25 linuxhelp xinetd[12479]: xinetd Version 2.3.15 started with libwrap loadavg labeled-networking options compiled in.
May 23 11:54:25 linuxhelp xinetd[12479]: Started working: 0 available services
May 23 11:54:25 linuxhelp systemd[1]: Started Xinetd A Powerful Replacement For Inetd.
To Setup configuration
The main configuration file is located in ' /etc/amanda/DailySet1/amanda.conf' .
Create a new directory called ' /amanda' to add a new configuration file. Then change the user permission to ' /amanda' and ' /etc/amanda' directories.
[root@linuxhelp ~]# mkdir /amanda
[root@linuxhelp ~]# chown amandabackup /amanda/ /etc/amanda/
Now switch to amandabackup user and create some directories as follows.
[root@linuxhelp ~]# su - amandabackup
-bash-4.2$ mkdir -p /amanda/vtapes/slot{1,2,3,4}
-bash-4.2$ mkdir -p /amanda/holding
-bash-4.2$ mkdir -p /amanda/state/{curinfo,log,index}
-bash-4.2$ mkdir -p /etc/amanda/MyConfig
All the directories will be created under /amanda and you can also create directory in any path of your choice.
Create the new configuration file for backup.
-bash-4.2$ vim /etc/amanda/MyConfig/amanda.conf
Add the following entries to ' amanda.conf' file
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 }
Next we need to create ' disklist' file with single disk entry. This file will mention which disk will be backed up by Amanda.
-bash-4.2$ vim /etc/amanda/MyConfig/disklist
Add the following line to the ' disklist' file.
localhost /etc simple-gnutar-local
To verify Amanda configuration
Run the following command to check the configuration.
-bash-4.2$ amcheck MyConfig
Amanda Tape Server Host Check
-----------------------------
NOTE: tapelist will be created on the next run.
Holding disk /amanda/holding: 14471168 kB disk space available, using 51200 kB as requested
slot 1: contains an empty volume
Will write label ' MyData01' to new volume in slot 1.
NOTE: skipping tape-writable test
NOTE: host info dir /amanda/state/curinfo/localhost does not exist
NOTE: it will be created on the next run.
NOTE: index dir /amanda/state/index/localhost does not exist
NOTE: it will be created on the next run.
Server check took 1.578 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.419 seconds. 0 problems found.
(brought to you by Amanda 3.3.3)
To run test backup
Now let’ s run the test backup by using ' amdump' command. This command will not produce any output, it will simply return back to terminal. To know about the result run ' echo $?' .
-bash-4.2$ amdump MyConfig
-bash-4.2$ echo $?
0
It should return the value ' 0' , which states that the test backup is successful. If it does not succeed then run the following command to see the report.
-bash-4.2$ amreport MyConfig
Hostname: linuxhelp
Org : MyConfig
Config : MyConfig
Date : May 23, 2016
These dumps were to tape MyData01.
The next tape Amanda expects to use is: 1 new tape.
STATISTICS:
Total Full Incr. Level:#
-------- -------- -------- --------
Estimate Time (hrs:min) 0:00
Run Time (hrs:min) 0:00
Dump Time (hrs:min) 0:00 0:00 0:00
Output Size (meg) 22.9 22.9 0.0
Original Size (meg) 22.9 22.9 0.0
Avg Compressed Size (%) 100.0 100.0 --
DLEs Dumped 1 1 0
Avg Dump Rate (k/s) 2779.1 2779.1 --
Tape Time (hrs:min) 0:00 0:00 0:00
Tape Size (meg) 22.9 22.9 0.0
Tape Used (%) 22.9 22.9 0.0
DLEs Taped 1 1 0
Parts Taped 1 1 0
Avg Tp Write Rate (k/s) 23450.0 23450.0 --
USAGE BY TAPE:
Label Time Size % DLEs Parts
MyData01 0:00 23450k 22.9 1 1
NOTES:
planner: Adding new disk localhost:/etc.
taper: Slot 1 without label can be labeled
taper: tape MyData01 kb 23450 fm 1 [OK]
DUMP SUMMARY:
DUMPER STATS TAPER STATS
HOSTNAME DISK L ORIG-kB OUT-kB COMP% MMM:SS KB/s MMM:SS KB/s
-------------------------- ------------------------------------- --------------
localhost /etc 0 23450 23450 -- 0:08 2779.0 0:01 23450.0
(brought to you by Amanda version 3.3.3)
To set Scheduled backup
Crontab is used for performing some automated task on scheduled time. Here, we use this crontab for setting the scheduled backup.
Add the following lines in " crontab -e" file
0 20 * * * amandabackup /usr/sbin/amcheck -m MyConfig 45 4 * * * amandabackup /usr/sbin/amdump MyConfig
To check version
Execute the following command to check the version of Amanda.
[root@linuxhelp ~]# amadmin --version
amadmin-3.3.3
Comments ( 1 )