Username:

Password:

Remember me

 
Table of content    <<  Previous    |    Next  >>



Excluding and splitting backup data

This chapter will describe two very important subjects – how to exclude data that you don't want to backup and how to split huge data into small pieces.

Excluding

As you've seen before, we specified file with list of directories to exclude in our backup style:

define dumptype default
{
 
exclude list "amandaexclude"
 
}

File 'amandaexclude' should be located at top directory of each disk you define. For example, if you have /home defined in your disklist file, you should locate file 'amandaexclude' as '/home/amandaexclude'. In this file you need to specify files that you don't want to backup:

log/httpd/*
log/httpd2/*
log/httpd2-ssl/*
log/httpsd/*
log/maillog*
tmp/*
*.tmp
*.temp

Remember, you should specify directories starting from defined disk. For example, if you have '/var' defined in your disklist and if you put '/var/log/httpd/' into exclude list, amanda will think that you want to exclude '/var/var/log/httpd'

Splitting data

One of disadvantages of amanda software is inability to split single huge disk to several tapes. Unfortunately, each disk defined in disklist must fit one tape. In order to avoid this problem you need to define subdirectories of your huge directories. But there's a problem and let us to use one of most complicated example of /home structure:

/home/mysql/
/home/www/
/home/users/user1
/home/users/user2

In order to find all directories like /home/users/userxxx, you can use command:

find /home -t d -mindepth 2 -maxdepth 2

It will find all directories that you'd like to backup separately. But in order to find other data located at /home, you could use command:

find /home -t d -mindepth 1 -maxdepth 1

But it will not work and here's why. It will find directory /home/users and place into our disklist, which will cause backuping /home/users, which is impossible in case if /home/users exceeds our tapes' size. So if you combine both results of find, you'll see:

/home/mysql/
/home/www/  
/home/users/  
/home/users/user1
/home/users/user2

To avoid this problem, you need to put the whole directory /home into your disklist, but put directories '/home/users/userxxx' into exclude list of /home. So final disklist for partition /home would like shown below:

server1.domain.com /home
{
default2
exclude append /home/users/user1
exclude append /home/users/user2
}

server1.domain.com /home/users/user1 { default }
server1.domain.com /home/users/user2 { default }
server1.domain.com /home/users/user100 { default }

One note. We used different backup style 'default2' that doesn't have option 'exclude', otherwise it will overwrite the option 'exclude append'.



Table of content    <<  Previous    |    Next  >>
Rambler's Top100