Amanda-Users

Re: Extracting amanda tapes without amanda ...

2004-01-23 06:20:55
Subject: Re: Extracting amanda tapes without amanda ...
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: amanda-users AT amanda DOT org
Date: Fri, 23 Jan 2004 06:18:30 -0500
On Friday 23 January 2004 03:38, Paul Bijnens wrote:
>Jobst Schmalenbach wrote:
>> When you want to extract tapes from a tape WITHOUT using amanda
>> how do you know which file a particular archive is located?
>
>I print out a postscript label, generated by amreport, and store it
>in the tapecasette.  Some people use "amtoc" to generated a listing.
>And there is the (slower) command "amrestore ConFig NoSuchHost",
>or even a loop in shell using only dd and mt.  Scanning the
>headers does not take as long as reading the complete tape.
>
>> Wouldnt it be a good idea to have a "table of content" located
>> in the second BLOCk?
>
>Some people (like Gene) write the necessary index and tools
>as the last file on tape.
>Amanda leaves the tape positioned at the end, just for just
>purposes.
>
Yes, but be aware that this requires a reduction of the stated 
capacity of the tape by enough to leave room in most cases.  In my 
case that means my DSD2 tapetype says its a 3650Mb tape .  And, as my 
method includes the complete indice directory, every indice in 
tapecycle days is included each time.  A du report on the directory I 
use to store this data, and which is also included in the disklist as 
a separate entry, is currently 2.2G, but a level 2 is 137 megs.  This 
is overkill IMO, and I may remove that entry from my disklist.  At 
the time its backup is done, the newest data in it is one run stale 
as my script that updates the file numbered as the tape number has 
not yet run, and of course cannot run till amanda is finished if it 
is to contain truely fresh, includes this tape, data.

>> Ie: when amanda starts writing it writes a zero fill
>> ed 32k 
>> block to the second file and when its finshed doing all the
>> work put a file in there containing

That is not sufficient room by my method, and depends on the drive 
being able to re-seek to that block very accurately.  Thats a huge 
variable, unknown on many drives.  The chance of inadvertantly 
over-writing the beginning of the next block, and the subsequent 
trashing of the whole tapes file structure is not something I'd take 
a chance on if I weren't very familiar with the drive from lots of 
previous testing.  Because of that, I doubt it would ever be 
considered to be made part of amanda.

The data I write as an appended pair of files, one for the indices and 
one for the config dir, is typically (in 32768 byte blocks):
---
At block 119347. #=3,910,762,496 bytes, amanda overshot my tapesize
2427+1 records in
2428+0 records out
At block 121775.
1+1 records in
2+0 records out
At block 121777.
---
Or 2430 * 32768 = 79,626,240 bytes.  This did fit without an EOT error 
but just barely.  When running smaller tapes, this becomes a "budget" 
item. :-)  I have a tell test that prevents this write if it won't 
fit in my scripts.

>>
>>  archive_name1 directory1 FILEMARK1
>>  archive_name2 directory2 FILEMARK2
>>  archive_name3 directory3 FILEMARK3
>>
>> This way you would only need to look up the block
>> and could blindly restore JUST by looking at the content
>> of the seocnd block.
>
>Partitioning a tape is not done with standard commands.
>
>Many tapedrives are not able to: if you write using the
>standard open/write/close then everything after the last
>close in the tape is gone, because the close also writes
>an end of data mark.
>
>Writing to a QIC-tape e.g. is done in a long serpentine,
>where, when hitting the end of the tape the tape is reversed,
>and the writing head is repositioned to write the data between
>the tracks of the first pass, up to 4 or 8 passes hence and
>forth over the tape.  When writing the first pass, there is
>an erase head that erases the complete width of the tape.
>
>Maybe it is because I've seen too many bad things happen
>with tapes and tapedrives, but I would not feel comfortable knowing
>the tape is rewound and written to somewhere in the beginning,
>and then hope the rest of the tape (with *ALL* the backups) are not
>affected.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty: soap,
ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.22% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.