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:

37010

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
Please read "Why adblockers are bad".



other Ads
Trace My Cash
Wenn Sie sich schon immer mal gefragt haben, wo eigentlich Ihr geliebtes Bargeld geblieben ist, finden Sie hier vielleicht die Antwort.
www.tracemycash.com
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
2017-03-25
Test-File - 1.442.0
Ebuild name:

dev-perl/Test-File-1.442.0

Description

Test file attributes

Added to portage

2017-03-25

Test-utf8 - 1.10.0
Ebuild name:

dev-perl/Test-utf8-1.10.0

Description

Handy utf8 tests

Added to portage

2017-03-25

ack - 2.18
Ebuild name:

sys-apps/ack-2.18

Description

ack is a tool like grep, optimized for programmers

Added to portage

2017-03-25

apt-cacher-ng - 3
Ebuild name:

net-misc/apt-cacher-ng-3

Description

Yet another caching HTTP proxy for Debian/Ubuntu software packages

Added to portage

2017-03-25

avogadro2 - 0.9.0
Ebuild name:

sci-chemistry/avogadro2-0.9.0

Description

Advanced molecule editor and visualizer 2

Added to portage

2017-03-25

avogadrolibs - 0.9.0
Ebuild name:

sci-libs/avogadrolibs-0.9.0

Description

Advanced molecule editor and visualizer 2 - libraries

Added to portage

2017-03-25

brainparty - 0.61-r1
Ebuild name:

games-puzzle/brainparty-0.61-r1

Description

A puzzle-solving, brain-stretching game for all ages

Added to portage

2017-03-25

conky - 1.10.6-r2
Ebuild name:

app-admin/conky-1.10.6-r2

Description

An advanced, highly configurable system monitor for X

Added to portage

2017-03-25

dbus - 1.10.16-r1
Ebuild name:

sys-apps/dbus-1.10.16-r1

Description

A message bus system, a simple way for applications to talk to each other

Added to portage

2017-03-25

exiftool - 10.47
Ebuild name:

media-libs/exiftool-10.47

Description

Read and write meta information in image, audio and video files

Added to portage

2017-03-25

genymotion-bin - 2.8.1-r1
Ebuild name:

app-emulation/genymotion-bin-2.8.1-r1

Description

Complete set of tools that provide a virtual environment for

Added to portage

2017-03-25

gnome-extra-apps - 3.22.2
Ebuild name:

gnome-base/gnome-extra-apps-3.22.2

Description

Sub-meta package for the applications of GNOME 3

Added to portage

2017-03-25

gnome-shell-extensions-topicons-plus - 20
Ebuild name:

gnome-extra/gnome-shell-extensions-topicons-plus-20

Description

Moves legacy tray icons to top panel

Added to portage

2017-03-25

h5py - 2.7.0
Ebuild name:

dev-python/h5py-2.7.0

Description

Simple Python interface to HDF5 files

Added to portage

2017-03-25

kbibtex - 0.6.2
Ebuild name:

app-text/kbibtex-0.6.2

Description

BibTeX editor by KDE to edit bibliographies used with LaTeX

Added to portage

2017-03-25

krfb - 16.12.3-r1
Ebuild name:

kde-apps/krfb-16.12.3-r1

Description

VNC-compatible server to share KDE desktops

Added to portage

2017-03-25

lilypond - 2.19.57
Ebuild name:

media-sound/lilypond-2.19.57

Description

GNU Music Typesetter

Added to portage

2017-03-25

marble - 16.12.3-r1
Ebuild name:

kde-apps/marble-16.12.3-r1

Description

Virtual Globe and World Atlas to learn more about Earth

Added to portage

2017-03-25

nm-applet - 1.4.6-r1
Ebuild name:

gnome-extra/nm-applet-1.4.6-r1

Description

GNOME applet for NetworkManager

Added to portage

2017-03-25

nmap - 7.40-r1
Ebuild name:

net-analyzer/nmap-7.40-r1

Description

A utility for network discovery and security auditing

Added to portage

2017-03-25

notmuch - 0.24
Ebuild name:

net-mail/notmuch-0.24

Description

Thread-based e-mail indexer, supporting quick search and tagging

Added to portage

2017-03-25

perl-cleaner - 2.24
Ebuild name:

app-admin/perl-cleaner-2.24

Description

User land tool for cleaning up old perl installs

Added to portage

2017-03-25

pouetchess - 0.2.0-r2
Ebuild name:

games-board/pouetchess-0.2.0-r2

Description

3D and open source chess game

Added to portage

2017-03-25

pysnmp - 4.3.5
Ebuild name:

dev-python/pysnmp-4.3.5

Description

Python SNMP library

Added to portage

2017-03-25

ripgrep - 0.5.0
Ebuild name:

sys-apps/ripgrep-0.5.0

Description

a command line search tool that combines usability with raw speed

Added to portage

2017-03-25

sddm - 0.14.0-r3
Ebuild name:

x11-misc/sddm-0.14.0-r3

Description

Simple Desktop Display Manager

Added to portage

2017-03-25

trayer - 1.0-r3
Ebuild name:

x11-misc/trayer-1.0-r3

Description

Lightweight GTK+ based systray for UNIX desktop

Added to portage

2017-03-25

vivaldi - 1.8.770.44_p1
Ebuild name:

www-client/vivaldi-1.8.770.44_p1

Description

A new browser for our friends

Added to portage

2017-03-25

wop - 0.4.3-r2
Ebuild name:

games-arcade/wop-0.4.3-r2

Description

Worms of Prey - A multi-player, real-time clone of Worms

Added to portage

2017-03-25

youtube-dl - 2017.03.24
Ebuild name:

net-misc/youtube-dl-2017.03.24

Description

Download videos from YouTube.com (and more sites...)

Added to portage

2017-03-25

2017-03-24
BSON - 1.4.0
Ebuild name:

dev-perl/BSON-1.4.0

Description

BSON serialization and deserialization

Added to portage

2017-03-24

Cache-FastMmap - 1.450.0
Ebuild name:

dev-perl/Cache-FastMmap-1.450.0

Description

Uses an mmaped file to act as a shared memory interprocess cache

Added to portage

2017-03-24

DateTime-Format-Flexible - 0.280.0
Ebuild name:

dev-perl/DateTime-Format-Flexible-0.280.0

Description

Flexibly parse strings and turn them into DateTime object

Added to portage

2017-03-24

DateTime-TimeZone - 2.110.0
Ebuild name:

dev-perl/DateTime-TimeZone-2.110.0

Description

Time zone object base class and factory

Added to portage

2017-03-24

Devel-CheckLib - 1.90.0
Ebuild name:

dev-perl/Devel-CheckLib-1.90.0

Description

check that a library is available

Added to portage

2017-03-24

Gearman - 2.3.1
Ebuild name:

dev-perl/Gearman-2.3.1

Description

Gearman distributed job system, client and worker libraries

Added to portage

2017-03-24

Image-Info - 1.400.0
Ebuild name:

dev-perl/Image-Info-1.400.0

Description

The Perl Image-Info Module

Added to portage

2017-03-24

Net-DNS - 1.90.0
Ebuild name:

dev-perl/Net-DNS-1.90.0

Description

Perl Net - Perl DNS Resolver Module

Added to portage

2017-03-24

PAR - 1.14.0-r1
Ebuild name:

dev-perl/PAR-1.14.0-r1

Description

Perl Archive Toolkit

Added to portage

2017-03-24

Tree-Simple - 1.300.0
Ebuild name:

dev-perl/Tree-Simple-1.300.0

Description

A simple tree object

Added to portage

2017-03-24

XML-LibXML - 2.12.900
Ebuild name:

dev-perl/XML-LibXML-2.12.900

Description

Perl binding for libxml2

Added to portage

2017-03-24

armadillo - 7.800.2
Ebuild name:

sci-libs/armadillo-7.800.2

Description

Streamlined C++ linear algebra library

Added to portage

2017-03-24

beignet - 1.3.1
Ebuild name:

dev-libs/beignet-1.3.1

Description

OpenCL implementation for Intel GPUs

Added to portage

2017-03-24

borgweb - 0.2.0
Ebuild name:

app-backup/borgweb-0.2.0

Description

Browser-based user interface for BorgBackup

Added to portage

2017-03-24

ca-certificates - 20161130.3.30-r1
Ebuild name:

app-misc/ca-certificates-20161130.3.30-r1

Description

Common CA Certificates PEM files

Added to portage

2017-03-24

classifier-reborn - 2.1.0
Ebuild name:

dev-ruby/classifier-reborn-2.1.0

Description

Module to allow Bayesian and other types of classifications

Added to portage

2017-03-24

cpuid2cpuflags - 3
Ebuild name:

app-portage/cpuid2cpuflags-3

Description

Tool to guess CPU_FLAGS_X86 flags for the host

Added to portage

2017-03-24

drupal - 8.3.0_rc2
Ebuild name:

www-apps/drupal-8.3.0_rc2

Description

PHP-based open-source platform and content management system

Added to portage

2017-03-24

elt-patches - 20170317
Ebuild name:

app-portage/elt-patches-20170317

Description

Collection of patches for libtool.eclass

Added to portage

2017-03-24

facter - 3.6.2-r1
Ebuild name:

dev-ruby/facter-3.6.2-r1

Description

A cross-platform ruby library for retrieving facts from operating systems

Added to portage

2017-03-24

kodi - 17.1
Ebuild name:

media-tv/kodi-17.1

Description

Kodi is a free and open source media-player and entertainment hub

Added to portage

2017-03-24

kodi-peripheral-joystick - 1.2.1-r1
Ebuild name:

media-plugins/kodi-peripheral-joystick-1.2.1-r1

Description

Libretro compatibility layer for the Kodi Game API

Added to portage

2017-03-24

kodi-peripheral-joystick - 1.3.1
Ebuild name:

media-plugins/kodi-peripheral-joystick-1.3.1

Description

Libretro compatibility layer for the Kodi Game API

Added to portage

2017-03-24

kodi-visualization-projectm - 1.2.1
Ebuild name:

media-plugins/kodi-visualization-projectm-1.2.1

Description

ProjectM visualizer for Kodi

Added to portage

2017-03-24

kstars - 16.12.3-r1
Ebuild name:

kde-apps/kstars-16.12.3-r1

Description

Desktop Planetarium

Added to portage

2017-03-24

lft - 3.78
Ebuild name:

net-analyzer/lft-3.78

Description

Layer Four Traceroute (LFT) and WhoB

Added to portage

2017-03-24

libinput - 1.7.0
Ebuild name:

dev-libs/libinput-1.7.0

Description

Library to handle input devices in Wayland

Added to portage

2017-03-24

lightdm - 1.22.0
Ebuild name:

x11-misc/lightdm-1.22.0

Description

A lightweight display manager

Added to portage

2017-03-24

metis - 5.1.0-r3
Ebuild name:

sci-libs/metis-5.1.0-r3

Description

A package for unstructured serial graph partitioning

Added to portage

2017-03-24

mustache - 1.0.4
Ebuild name:

dev-ruby/mustache-1.0.4

Description

Mustache is a framework-agnostic way to render logic-free views

Added to portage

2017-03-24

netdata - 1.6.0
Ebuild name:

net-analyzer/netdata-1.6.0

Description

Linux real time system monitoring, done right

Added to portage

2017-03-24

openrc - 0.24.2
Ebuild name:

sys-apps/openrc-0.24.2

Description

OpenRC manages the services, startup and shutdown of a host

Added to portage

2017-03-24

razercfg - 0.38
Ebuild name:

sys-apps/razercfg-0.38

Description

Utility for advanced configuration of Razer mice (DeathAdder, Krait, Lachesi

Added to portage

2017-03-24

samba - 4.5.7
Ebuild name:

net-fs/samba-4.5.7

Description

Samba Suite Version 4

Added to portage

2017-03-24

samba - 4.6.1
Ebuild name:

net-fs/samba-4.6.1

Description

Samba Suite Version 4

Added to portage

2017-03-24

screenfetch - 3.8.0
Ebuild name:

app-misc/screenfetch-3.8.0

Description

Bash Screenshot Information Tool

Added to portage

2017-03-24

tcpreplay - 4.2.1
Ebuild name:

net-analyzer/tcpreplay-4.2.1

Description

utilities for editing and replaying previously captured network traffi

Added to portage

2017-03-24

timezone-data - 2017b
Ebuild name:

sys-libs/timezone-data-2017b

Description

Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)

Added to portage

2017-03-24

wireguard - 0.0.20170324
Ebuild name:

net-vpn/wireguard-0.0.20170324

Description

Simple yet fast and modern VPN that utilizes state-of-the-art crypto

Added to portage

2017-03-24

xfig - 3.2.5c-r1
Ebuild name:

media-gfx/xfig-3.2.5c-r1

Description

A menu-driven tool to draw and manipulate objects interactively in an X wi

Added to portage

2017-03-24

xfig - 3.2.6a
Ebuild name:

media-gfx/xfig-3.2.6a

Description

A menu-driven tool to draw and manipulate objects interactively in an X windo

Added to portage

2017-03-24

rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2017 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: 5.5 ms
system status display