In a message dated: Thu, 21 Dec 2000 14:34:19 +0800
"Mark Berger" said:

>What I cannot seem to figure out is supposing I have 8 machines  ( 1 main
>server & 7 others) & want to do a full backup of the main server every night
>& a full backup of one other machine per day either in rotation or ad-hoc
>how can I persuade amanda to allow me to label / rotate tapes manually &
>always do a full backup of the specified machine?

Well, you can tell amanda what type of backup to perform in the disklist
for that particular host:

        hostA   /       comp-root-always-full

says to backup the root partition on hostA and use the "comp-root-always-full"
dumptype from the amanda.conf file.  This dumptype (for me anyway) is defined
in amanda.conf as:

        define dumptype comp-root-always-full {
            comp-always-full
            comment "Root partitions with compression"
            compress client fast
            priority high
            holdingdisk yes
            maxdumps 5
        }

which in turn inherits from the "comp-always-full" dumptype defined thusly:

        define dumptype comp-always-full {
            global
            comment "Full dump of this filesystem always"
            compress server fast
            priority high
            dumpcycle 0
        }

So, hostA always gets a full dump performed when ever amdump is run on this 
particular configuration.

>It appears to me that much effort has gone into the scheduling etc but I am
>completely unclear as to how I might just say "backup machine 10.0.78.56 (
>or whatever ) in full to whatever tape happens to be in the drive - no
>arguments - no wrong tape etc just do it!" . - Or for that matter restore a
>file / group of files from tape in drive to machine
>xx.xx.xx.xx:/directory/subdirectory

Well, using whatever tape is in the drive may be a little trickier, since 
amanda was intentionally designed to never overwrite an existing tape.
However, with a little ingenuity, all things are possible :)

You could write a script that did something like the following. (beware,
completely untested :)

        #!/usr/bin/perl

        $config="DailySet1"

        $current=`amtape DailySet1 current`;
        ($junk,$slot,$junk,$date,$junk,$label) = split (/\s/,$current);
        $slot =~ s/://g;

        if ( $current =~ /label DailySet/) {

                $label = s/.*label (\w+\d+)/\1/;        
                system ("amrmtape -q $config $label);
                system (amtape $config $label);
        }

        system ("amdump $config");


The only problem with the above command is this line:

        $current=`amtape DailySet1 current`;

The problem is that amtape seems to send all it's output to STDERR instead of 
STDOUT.  You may be able to get creative with shell re-direction.

>Surely there must be a way to use the program on a more simple basis as
>above

Sure, you need a little creativity :)

>Perhaps sonmeone would be good enough to shed some light on this mystery
>please??

Make sure you read through all the man pages and understand all the various 
amanda "am" commands.  Those combined with some shell scripting can result in 
some truly and amazingly customizable configurations :)

-- 
Seeya,
Paul
----
           I'm in shape, my shape just happens to be pear!

         If you're not having fun, you're not doing it right!


Reply via email to