On Sunday 29 January 2006 10:28, Omer wrote: >Hi > >I am writing wrapper scripts for amdump and amflush which add some > extra files on the tape after a normal dump/flush. It's working fine > but I would like to make this consistent with the files written by > Amanda, with one header block for the label/comment, so I can restore > them with the same amdd command (skip=1). I'm actually doing this: > >echo "AMANDA: EXTRA-START $start_date" | amdd bs=32k of="$TAPE" > count=1 tar -cf - /extra/dir | amdd bs=32k of="$TAPE" >echo "AMANDA: EXTRA-END" | amdd bs=32k of="$TAPE" count=1 > This is a worthwhile idea, but one I wasn't able to effectively do here. I'm just generating the files, a pair of them, and then dd'ing them to the tape(or in my case the disk). If you keep printouts then you'll know how many fsf's you do to the tape to get to these files.
One suggestion I'd make is to change the generation such that its all one file on the disk before doing the amdd operation that puts it on the tape. Then the question is, how to pad for a 32k header & trailer? Maybe something like this would do it: echo "AMANDA: EXTRA-START $start_date"|amdd count=1 bs=32k of=/path/to/scratch_file0 So this makes the header block, then: tar -cf /extra/dir |amdd bs=32k of=/path/to/scratch_file1 Which should make the backup itself a 32k block size integral, then: echo "AMANDA: EXTRA-END" |amdd count=1 bs=32k of=/path/to/scratch_file2 Doing ditto, then to combine it all: cat /path/to/scratch_file0 /path/to/scratch_file1 /path/to/scratch_file2 >/path/to/final_copy and finally, put it on the tape amdd if=/path/to/final_copy bs=32k of=$TAPE And then: rm -f /path/to/scratch_file* /path/to/final_copy But I haven't tried that, based as much on the premise that if I need them, then I am indeed in a bare metal recovery situation, and I'd be just as well off using just dd, which in fact I am doing. I can show that easily because I'm using the FILE: type, and can access those extra but sorely needed files just by doing an ls to get the filename correct, and a dd to recover, or even untar them where they sit if need be. Tape users would need, in this case, to do an mt fsf 49 -f /dev/nst0 to position the tape correctly. Unforch ls sorts them needlessly here so I'll edit: #>ls /amandatapes/Dailys/data 00000-Dailys-9 00000.Dailys-9 [...] 00049-TAPEEND 00049.TAPEEND configuration.tar indices.tar indices.tar is the whole indice tree, and configuration.tar is the complete /usr/local/etc/amanda/Daily tree. In recovering those with tar, I now have all the config & indice details, and by grabbing /home I then have the current snapshot and can install from there, then recover the rest using all amanda tools. >... which produce three distinct files on the tape. How can I merge > the label and the tar file so I can restore it with: > >ammt bs=32k if=$TAPE skip=1 | tar -xf - > >? >Thanks I'm just thinking out loud here, in the hope that its helpefull. -- Cheers, Gene People having trouble with vz bouncing email to me should add the word 'online' between the 'verizon', and the dot which bypasses vz's stupid bounce rules. I do use spamassassin too. :-) Yahoo.com and AOL/TW attorneys please note, additions to the above message by Gene Heskett are: Copyright 2006 by Maurice Eugene Heskett, all rights reserved.
