|
In this chapter we'll describe how to configure different types of
backup and how to define list of servers to backup.
Configuring styles of backup.
First of all, you need to tell your amanda your dump styles.
Mostly for all situations single style is enough, though you can
define multiple styles for specific cases
define dumptype
default
{
global
estimate calcsize
program "GNUTAR"
dumpcycle 14
comment "root
partitions dumped with tar"
compress server
fast
index
priority medium
exclude list
"amandaexclude"
tape_splitsize 20
Gb
}
Here are the explanations for each
option:
global
Means you can use this style to backup
your disks. For example, you can define several styles and combine
them into final 'global' style. We didn't use that to keep
configuration simple.
estimate
calcsize
Method to use to estimate data located
on your servers. There're 2 most useful possible settings -
“calcsize” and “server”. In case of 'calcsize' amanda will
run a C++ program on each server to calculate data. It's most
accurate way to estimate data but it takes time in case of huge
number of files. And second option is 'server', which tells amanda to
use estimation from previous runs for this server. If your data is
changing so much, amanda may fail to estimate correctly which will
cause wrong planning.
program
"GNUTAR"
Software to use to archive data. Unless you want to dump your
filesystems, gnutar is optimal option.
Dumpcycle 14
How often amanda should perform full backup. We put 14 days (two
weeks).
compress server fast
There are two possible options how you
want to compress data – on slave servers or backup server. For
first method use “client” and for second method use “server”.
In our case we had powerful server so we used 'server'. Additionally,
you can specify 'best', 'custom', 'fast' to choose compression level. Index
This option tells amanda to keep
database with tape cartridges with list of content on them. Default
amanda configuration doesn't have so you must enable it in order to
be able to search backup data on tapes.
exclude list
"amandaexclude"
On each disk that you will define for
your servers, you must put file “amandaexclude”. You need to
define list of files or directories that you want to exclude from
backup, for example log files. Even if you don't have anything to
exclude, you should put at least empty file otherwise backup will
fail. For details, see chapter “excluding and splitting backup
data”.
priority medium
For some disks you might want to
specify different priorities. For example, you can use 'high',
'medium', 'low'. If backup system becomes into degrade status due to
some errors ( for example no enough tapes to write), disks with
higher priority will be backuped first to make sure that most
important data is saved.
tape_splitsize
20 Gb
To reduce fragmentation of your tape
space, you can specify maximal size of each data piece wrtten into
tape. For example, if you specify 100GB for 200GB tape cartridges,
you will definitely fall into high fragmentation because amanda
software will have to find a tape cartridge with 100GB unused space.
If you specify very small chunk's size, performance of writing to
tape cartridges will degrade.
Configuring slave servers
On this step we will show how to make
list of slave servers, and their disks that you'd like to backup.
There's a file called disklist located in your configuration
directory. In our case it was
/usr/local/etc/amanda/DailySet1/disklist. This file has a list of top
directories on each server that you want to backup. For example,
here's an example:
server1.domain.com
/ { default }
server1.domain.com
/boot {
default
}
server1.domain.com
/var { default }
server1.domain.com
/usr { default }
server1.domain.com
/home { default }
You might ask “Why did you define
many directories instead of putting single item with root directory
'/' ? “. When amanda runs tar software, it specifies that tar
should stay on single file system so that neither symlinks nor NFS
mounts nor any other mounting manipulations causes double backup
data. On our servers we use dedicated partitions for /boot, /home/,
/usr, and /var. so we had to specify all partitions we had. If you
home is very huge, you should split it into sub-backups. Refer to the chapter “excluding and splitting
backup data”.
To define backup style, open
/usr/local/etc/amanda/DailySet1/amanda.conf and configure the
following definition:
define dumptype root-tar { global estimate calcsize program "GNUTAR" dumpcycle 14 comment "root partitions dumped with tar" }
|