Oh, sweet symmetry!

Nothing to say, really, but dang, it’s 7-7-7 (whether you use the drain-bamaged US notation, EU, or ISO order), so I need to write something.

Today, I’ve been trying to beat Amanda into submission. No, she’s not my wife, girlfriend, sister, daughter or dog. It’s the Advanced Maryland Automatic Network Disk Archiver. It was probably “advanced” back in 1997 when hard disks were expensive and backing up to tape made sense. Nowadays, we back up to a big array of hard disks on an off-site server. Amanda, however, is still tape-oriented, so a certain amount of hackery is involved. Fortunately, the multi-changer and “file” tape type make this not too hard. We’ve actually got that part working. Splitting up large volumes so they can be backed up in a staggered fashion wasn’t too hard either. The trickiest part is getting Amanda to recognise and use exclude lists. I think I’ve got it now.

The /etc/amanda/DailySet1/amanda.conf file contains:

1
2
3
4
5
6
define dumptype hard-disk-tar {
    hard-disk-dump
    comment "Back up to hard disk instead of tape - using tar"
    program "GNUTAR"
    exclude list optional ".amanda.excludes"
}

And /etc/amanda/DailySet1/disklist contains:

1
2
3
4
HOST  /var_www_html_steven             /var/www        {
        hard-disk-tar
        include "./html/steven"
    }

Obviously, tar will look for ”/var/www/.amanda.excludes”, not ”/var/www/html/steven”. My first idea was to add a line like ’exclude list “./html/steven/.amanda.excludes”’, but
this article explains why that wouldn’t work (there’s already and exclude in the dumptype definition).

This leaves two options:

  • Use a different dumptype, one that hasn’t got the ”exclude” statement, and use that type in the disklist file, specifying an explicit ”exclude” for each instance where it’s used.
  • Re-base the backup block in disklist to e.g. /var/www/html/steven.

I chose the second approach:

1
2
3
HOST  /var_www_html_steven             /var/www/html/steven        {
        hard-disk-tar
    }

Let’s wait for tomorrow’s run to see if it works…

[Update 8 July 2007]

It works!