Amanda-Users

Re: amfetchdump inventory mode

2007-09-27 11:11:18
Subject: Re: amfetchdump inventory mode
From: Jean-Francois Malouin <Jean-Francois.Malouin AT bic.mni.mcgill DOT ca>
To: Jon LaBadie <jon AT jgcomp DOT com>
Date: Thu, 27 Sep 2007 11:07:50 -0400
Hi Jon,

* Jon LaBadie <jon AT jgcomp DOT com> [20070926 17:49]:
> On Wed, Sep 26, 2007 at 04:26:50PM -0400, Jean-Francois Malouin wrote:
> > 
> > One of the most important feature of amanda was (it still is but read
> > on) the possibility of doing a bare-metal restore with just a few
> > utilities. I say was because in my case the ever increasing amount of
> > data, the size of the DLEs and the number of chunks needed in order to
> > fit in my tapes (LTO-1 and LTO-3) was getting out of hand --too much
> > likely to 'forget' some data while including/excluding dirs in a DLE--
> > so I had to use the tape spanning feature. I get a much better tape
> > usage but now I can't do bare-metal restores in case something real
> > bad happens. I understand that I can't have both the cake AND the
> > cherry but I would be hard pressed to justify using amanda to our
> > computer people at my site when such an important feature is missing.
> > 
> 
> Jean-Francois,
> 
> I think you lose less than you realize.  I've not tested a bare-metal
> restore with my spanned dumps, but here is how I view the procedural
> difference from a non-spanned dump.
> 
> For non-spanned:
> 
> 1. you need to locate the specific tape file where the DLE begins.
> 2. you need to use mt to position your tape at the beginning of the file
> 3. you need to use dd to strip off the first 32KB of the tape file.
> 4. you need to feed the rest of the file to your restore command(s),
>    eg. unzip, tar, ...
> 
> For spanned:
> 
> 1. the same except you also need to determine the number of chunks and
>    whether it spreads to multiple tapes
> 2. the same
> 3. a modification
> 4. the same
> 
> Recognize that the spanned pieces are all one after the other on the
> tape, and if crossing to another tape, at the beginning of that tape.
> But, if it crosses to another tape, the last chunk on the tape is
> not valid.
> 
> So step 3 becomes not one "dd bs=32k skip=1 ..." but a loop through
> the chunks doing the same dd command on each chunk.  In a scenario
> where you knew the dump was in 5 chunks, step 3, piped into step 4
> could be simply:
> 
>   for i in 1 2 3 4 5
>   do
>       dd bs=32k skip=1 if={your tape dev}
>   done | {step 4 commands}
> 
> Obviously it would be more complex if the DLE were split over
> multiple tapes, but then something like this is possible:
> 
>   (
>   FOR LOOP FROM ABOVE
>   tape change commands
>   tape position commands (to skip over amanda tape header to first file)
>   ANOTHER FOR LOOP
>   ) | {step 4 commands}
> 
> And I've ignored the bad last chunk.
> 
> If sufficient disk space were available, you could just save
> each chunk with a sequential number.  Then cat the chunks
> piping them into the step 4 commands.
> 
> Amfetchdump tries to automate this.
> And if I understand the -i option, assists in locating the chunks.
> But it still can all be done manually.
> 
> What you lose by spanning is the simplicity of having the entire
> dump in a single tape file.  But the manual recovery procedure
> is still basically the same.

Yes, you're right that it is manually feasable. However conceptually
simple the task is, I feel that potential mistakes are bound to
happen, particularly when doing a restore under pressure! Remember,
you have the mob^H^H^Husers on your back, yelling bad words at you :)

I'll see if I can write a dirty little script that could somehow
automate the procedure...

Thank you for taking the time to comment!
jf

> 
> -- 
> Jon H. LaBadie                  jon AT jgcomp DOT com
>  JG Computing
>  4455 Province Line Road        (609) 252-0159
>  Princeton, NJ  08540-4322      (609) 683-7220 (fax)

-- 
<° ><

<Prev in Thread] Current Thread [Next in Thread>