from small one page howto to huge articles all in one place
 

search text in:




Other .linuxhowtos.org sites: www.linuxhowtos.org
toolsntoys.linuxhowtos.org



Last additions:
How to make X listen on port 6000

How to make X listen on port 6000

words:

34

views:

42697

userrating:

average rating: 1.5 (4 votes) (1=very good 6=terrible)


May, 25th 2007:
April, 26th 2007:
Apr, 10th. 2007:
Druckversion . pdf icon
You are here: Tutorials per portage category->app-admin->amanda

Amanda - Creating Successful Backups

by Gavin Henry

Amanda, the Advanced Maryland Automatic Network Disk Archiver;

is a backup system that allows the administrator of a LAN to set up a single master backup server to back up multiple hosts to a single large capacity tape drive. Amanda uses native dump and/or GNU tar facilities and can back up a large number of workstations running multiple versions of Unix. Recent versions can also use SAMBA to back up Microsoft Windows hosts.

NOTICE: This is an updated and amended version for Fedora, using Xander Harkness' (http://www.harkness.co.uk/) original article with his permission.

I was searching a few weeks ago for a good backup program and tried Arkeia and hated it, as it was very complicated. Xander shared my feelings, as indicated on his site, and I thought I would use his excellent article, but update it for this.

The installation and configuration can be done over a few evenings or mornings for the typical system administrator or home user, or in one day, if you have time.

NOTE: This tutorial assumes you have a working and installed SCSI tape drive.

Installation - Server Side

Download packages the rpm packages (for server and clients, issue rpm -ivh *.rpm in the appropriate directory.):

amanda-2.4.4p1-1.i386.rpm for the server and client.

amanda-client-2.4.4p1-1.i386.rpm for the client only.

amanda-server-2.4.4p1-1.i386.rpm for the server only.

or simply:

apt-get install amanda amanda-client and

apt-get install amanda amanda-server
or use the the package management tool for your distro (emerge, yum, rpm, ...)

Now onto the configuration;

Step 1

Run the command:

amtapetype -f /dev/nst0
(this is not a spelling mistake).
This is done so that you may receive an analysis of the tape device and the tape types. This is relevant, for example a Compaq 12/24 Gb DAT drive using DDS3 tapes may only provide 10Gb of space for backups. If the AMANDA configuration is told that the tapes will hold 12Gb then you will consistently get failed backups owing to lack of space.

The output from tapetype may well take many hours as it writes to the complete tape a couple of times.

The output will look something like this:

tapetype tape-dds3 {
comment "just produced by tapetype program"
length 9922 mbytes
filemark 0 kbytes
speed 973 kps
}
NOTE: The comment and typetype can be anything you like. You need to edit the file
/etc/amanda/DailySet1/amanda.conf
about half-way down the file you will find many tape definitions and you should add the new one you have just created. Please note that the name of the tape should be unique within the file, I have called mine SONY-DSS-4. do not put spaces in, keep it short and simple. You will see other tape names such as DAT and QIC-60. Also ensure you get both parentheses in too. Further up in the file you will see the definition within the configuration file: tapetype HP-DAT (or similar), this should be changed to tapetype yournewname.

There are three amanda packages available for Fedora, these are amanda, amanda-client and amanda-server. For the clients you will only need amanda and amanda-client. For the server you will obviously need amanda-server. There is an example configuration in /etc/amanda/DailySet1/, using this and modifying the files to make them work for the particular setup required is the easiest option.

Step 2

Edit the file /etc/amanda/DailySet1/amanda.conf, the items you need to set in this file are as follows:

org - This is in the email subject to differentiate between different backups.

mailto - This should be set to the administrator's email addresses. Multiple addresses may be entered separated by spaces.

tapecycle - This is the number of tapes in circulation. It is much easier if the tapes are labelled before we start testing. If Amanda encounters an unlabelled tape, it will be rejected rather than attempt to overwrite it.

tapedev /dev/null - this should be changed to tapedev /dev/nst0, as this is the non-rewinding device for Linux.

Step 3

Label a tape:

The command should be run as amanda, so here we have the command, by the user root

su amanda -c "/usr/sbin/amlabel DailySet1 DailySet101"
This command may be broken down as follows:

su (super user / switch user) to amanda -c (run command as this user) amlabel a tape belonging to backup group DailySet1 and label it as DailySet101. Note that the amanda.conf file specifies what the tapes may be labelled as, by default this is DailySet100 to DailySet199. The default back up cycle is a month.

If there is an error you normally get a good error message to advise you how to fix it. You will probably get a warning message regarding inability to read .bashrc, this is not something to worry about. I would suggest getting one backup to work and then labelling all the tapes, this may take some time as each tape could take 30-45 seconds to label.

Now we set one partition to backup:

Before this step make sure, as root, you change (on the server and on the client) disable = no in /etc/xinetd.d/amanda and /etc/xinetd.d/amandaidx (on the client only) then service xinetd restart. Issue a netstat -ul | grep amanda and you should have

udp        0      0 *:amanda                *:*

edit file /etc/amanda/DailySet1/disklist down at the bottom, comment out using # all of the backups that are there by default or for example.

Put in one backup that being the name of your machine:

localhost /etc comp-root-tar This will only backup the /etc partition, which is normally quite small and makes a good test.

Final task for Step 3 is to test and then run a backup:

run the command:

su amanda -c "/usr/sbin/amcheck DailySet1"

This should give us some diagnostic data and tell us whether there are any problems. If this is the first time the backup has been run, it will normally complain about missing index files. These are created during the backup.

Try running the backup and it will continue until finished at which point it will send the admins an email to tell you all is done and provide a report:

su amanda -c "/usr/sbin/amdump DailySet1"

Step 4

Once we have operational backups, we can then automate them:

As root run the following command:

crontab -e
This will normally open the vi editor to edit your cron schedule.

press i to insert and type the following:

# backup daily

5 2 * * 1,2,3,4,5 su amanda -c "/usr/sbin/amdump DailySet1"
0 16 * * 1,2,3,4,5 su amanda -c "/usr/sbin/amcheck DailySet1"

These will run backups at 2:05am every weekday (late Sunday night - Monday morning) and at 4pm run a diagnostic to ensure that you have put the correct tape in and that all backup hosts are available.

Step 5

The last jobs are to add disks / machines to the backup, this will probably carry on over time as the system is tweaked and machines are added to the network.

The Amanda client is only available to Unix systems at present; however other systems may be backed up using file shares and the samba libraries.

For every machine that you add to the disklist / backup you have to tell the client machine that it authorises the backup server to access it. This is done by putting the backup server name in the following file:

/var/lib/amanda/.amandahosts

Just put the server name on a line on its own. Please note that the authorisation will fail if it fails to resolve this IP using DNS. To get round this you can enter the name and IP address in the /etc/hosts file.

you can then add more machines to the disk list as follows:

client1.domain.co.uk /etc comp-root-tar

client1.domain.co.uk /home comp-root-tar

client2.domain.co.uk hda1 comp-root-tar

NOTE: You can either use hardware names or the partitions

The hard drive names may be found using the command mount with no arguments. Please also note that amanda cannot backup a disk or partition larger than one disk at present. This may change in the future. Amanda works very well spreading full backups across the backup cycle, so that full backups are done as frequently as possible and does not leave a huge backup rush at the month end.

Windows systems:

To backup windows systems you may wish to ensure that you have the latest version of Amanda available.

These systems are also entered into the disklist file as follows:

sambaserver.domain.com //windowsclient/share comp-root-tar

Windows clients also need to use another file containing the passwords for the shares: The share containing the passwords is /etc/amandapass and has the following format:

//windowsmachine/share user%pass

This file must be readable only by user amanda and group disk. This can be adjusted using the following commands:

chown amanda.disk /etc/amandapass
chmod o-rwx /etc/amandapass

NOTE: I had loads of trouble getting xinetd.d to make amanda to listen on the server, this was due to the following line being missing in /etc/xinetd.conf

includedir /etc/xinetd.d

I hope everything is straight forward for you. Please e-mail me below if you have any troubles :-)

Well, that's it for now. For any comments or corrections, please e-mail me.

Keep an eye out for "Amanda - Restoring Successful Backups".


rate this article:
current rating: average rating: 1.3 (3 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back



Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2018-09-22
ViSP - 3.0.1-r1
Ebuild name:

sci-libs/ViSP-3.0.1-r1

Description

Visual Servoing Platform visual tracking and visual servoing library

Added to portage

2018-09-22

ViSP - 3.1.0-r1
Ebuild name:

sci-libs/ViSP-3.1.0-r1

Description

Visual Servoing Platform visual tracking and visual servoing library

Added to portage

2018-09-22

gast - 0.2.0
Ebuild name:

dev-python/gast-0.2.0

Description

A generic AST to represent Python2 and Python3's Abstract Syntax Tree (AST)

Added to portage

2018-09-22

glm - 0.9.9.2
Ebuild name:

media-libs/glm-0.9.9.2

Description

OpenGL Mathematics

Added to portage

2018-09-22

libreoffice-bin - 6.0.6.2
Ebuild name:

app-office/libreoffice-bin-6.0.6.2

Description

A full office productivity suite. Binary package

Added to portage

2018-09-22

libreoffice-bin-debug - 6.0.6.2
Ebuild name:

app-office/libreoffice-bin-debug-6.0.6.2

Description

LibreOffice, a full office productivity suite. Binary pack

Added to portage

2018-09-22

mysql-init-scripts - 2.2-r4
Ebuild name:

dev-db/mysql-init-scripts-2.2-r4

Description

Gentoo MySQL init scripts.

Added to portage

2018-09-22

postgresql - 11_beta4
Ebuild name:

dev-db/postgresql-11_beta4

Description

PostgreSQL RDBMS

Added to portage

2018-09-22

tensorflow - 1.11.0_rc1-r1
Ebuild name:

sci-libs/tensorflow-1.11.0_rc1-r1

Description

Computation framework using data flow graphs for scalable machine

Added to portage

2018-09-22

2018-09-21
android-ndk - 18
Ebuild name:

dev-util/android-ndk-18

Description

Open Handset Alliance's Android NDK (Native Dev Kit)

Added to portage

2018-09-21

baldurs-gate-ee - 2.5.23121
Ebuild name:

games-rpg/baldurs-gate-ee-2.5.23121

Description

Baldur's Gate Enhanced Edition

Added to portage

2018-09-21

binutils - 2.31.1-r1
Ebuild name:

sys-devel/binutils-2.31.1-r1

Description

Tools necessary to build programs

Added to portage

2018-09-21

binutils-hppa64 - 2.31.1-r1
Ebuild name:

sys-devel/binutils-hppa64-2.31.1-r1

Description

Tools necessary to build programs

Added to portage

2018-09-21

binutils-libs - 2.31.1-r1
Ebuild name:

sys-libs/binutils-libs-2.31.1-r1

Description

Core binutils libraries (libbfd, libopcodes, libiberty) for extern

Added to portage

2018-09-21

bitcoin-cli - 0.16.3
Ebuild name:

net-p2p/bitcoin-cli-0.16.3

Description

Command-line JSON-RPC client specifically for interfacing with bitcoind

Added to portage

2018-09-21

bitcoin-qt - 0.16.3
Ebuild name:

net-p2p/bitcoin-qt-0.16.3

Description

An end-user Qt GUI for the Bitcoin crypto-currency

Added to portage

2018-09-21

bitcoin-tx - 0.16.3
Ebuild name:

dev-util/bitcoin-tx-0.16.3

Description

Command-line Bitcoin transaction tool

Added to portage

2018-09-21

bitcoind - 0.16.3
Ebuild name:

net-p2p/bitcoind-0.16.3

Description

Original Bitcoin crypto-currency wallet for automated services

Added to portage

2018-09-21

clair - 2.0.6
Ebuild name:

dev-util/clair-2.0.6

Description

Vulnerability Static Analysis for Containers

Added to portage

2018-09-21

cmatrix - 1.2a-r4
Ebuild name:

app-misc/cmatrix-1.2a-r4

Description

An ncurses based app to show a scrolling screen from the Matrix

Added to portage

2018-09-21

cni-plugins - 0.7.3
Ebuild name:

net-misc/cni-plugins-0.7.3

Description

Standard networking plugins for container networking

Added to portage

2018-09-21

cnijfilter2 - 5.50
Ebuild name:

net-print/cnijfilter2-5.50

Description

IJ Printer Driver

Added to portage

2018-09-21

encodings - 1.0.4-r3
Ebuild name:

media-fonts/encodings-1.0.4-r3

Description

X.Org font encodings

Added to portage

2018-09-21

exiv2 - 0.26_p20180811-r2
Ebuild name:

media-gfx/exiv2-0.26_p20180811-r2

Description

EXIF, IPTC and XMP metadata C++ library and command line utility

Added to portage

2018-09-21

exiv2 - 0.26_p20180811-r3
Ebuild name:

media-gfx/exiv2-0.26_p20180811-r3

Description

EXIF, IPTC and XMP metadata C++ library and command line utility

Added to portage

2018-09-21

gst-plugins-meta - 1.14.3
Ebuild name:

media-plugins/gst-plugins-meta-1.14.3

Description

Meta ebuild to pull in gst plugins for apps

Added to portage

2018-09-21

gtk+ - 3.24.1
Ebuild name:

x11-libs/gtk+-3.24.1

Description

Gimp ToolKit +

Added to portage

2018-09-21

iwd - 0.8
Ebuild name:

net-wireless/iwd-0.8

Description

Wireless daemon for linux

Added to portage

2018-09-21

libbitcoinconsensus - 0.16.3
Ebuild name:

net-libs/libbitcoinconsensus-0.16.3

Description

Bitcoin Core consensus library

Added to portage

2018-09-21

libssh - 0.8.3
Ebuild name:

net-libs/libssh-0.8.3

Description

Access a working SSH implementation by means of a library

Added to portage

2018-09-21

lttng-modules - 2.10.6-r1
Ebuild name:

dev-util/lttng-modules-2.10.6-r1

Description

LTTng Kernel Tracer Modules

Added to portage

2018-09-21

master-pdf-editor - 5.1.42
Ebuild name:

app-text/master-pdf-editor-5.1.42

Description

A complete solution for viewing and editing PDF files

Added to portage

2018-09-21

mplus-fonts - 2.2.4-r1
Ebuild name:

media-fonts/mplus-fonts-2.2.4-r1

Description

M+ Japanese bitmap fonts

Added to portage

2018-09-21

opera-beta - 56.0.3051.28
Ebuild name:

www-client/opera-beta-56.0.3051.28

Description

A fast and secure web browser

Added to portage

2018-09-21

passwordsafe - 1.06_beta-r1
Ebuild name:

app-admin/passwordsafe-1.06_beta-r1

Description

Password manager with wxGTK based frontend

Added to portage

2018-09-21

prometheus - 2.4.1
Ebuild name:

app-metrics/prometheus-2.4.1

Description

Prometheus monitoring system and time series database

Added to portage

2018-09-21

prometheus - 2.4.2
Ebuild name:

app-metrics/prometheus-2.4.2

Description

Prometheus monitoring system and time series database

Added to portage

2018-09-21

puppetserver - 6.0.0-r1
Ebuild name:

app-admin/puppetserver-6.0.0-r1

Description

Puppet Server is the next-generation application for managing Puppe

Added to portage

2018-09-21

rtsp-conntrack - 3.7-r1
Ebuild name:

net-firewall/rtsp-conntrack-3.7-r1

Description

RTSP conntrack module for Netfilter

Added to portage

2018-09-21

ski - 1.3.2-r3
Ebuild name:

app-emulation/ski-1.3.2-r3

Description

ia64 instruction set simulator

Added to portage

2018-09-21

smc-sum-driver - 1.6.0.20151201-r2
Ebuild name:

sys-apps/smc-sum-driver-1.6.0.20151201-r2

Description

Supermicro Update Manager (SUM) kernel module

Added to portage

2018-09-21

wesnoth - 1.14.5
Ebuild name:

games-strategy/wesnoth-1.14.5

Description

Battle for Wesnoth - A fantasy turn-based strategy game

Added to portage

2018-09-21

rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2018 Sascha Nitsch Unternehmensberatung UG(haftungsbeschänkt)
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 94.6 ms