Discussion:
Urgent!! Tape Dumps with same file name
(too old to reply)
unknown
2006-08-03 03:22:45 UTC
Permalink
The following situation has happened in my case due to an
error by the user

"If you perform two or more dumps to a tape device and use
the same file name for both dumps (specified with the
FILENAME parameter), Adaptive Server appends the second dump
to the archive device. You will not be able to restore the
second dump because Adaptive Server locates the first
instance of the dump image with the specified file name and
restores this image instead. Adaptive Server does not search
for subsequent dump images with the same file name."


How can i recover my second dump

Rgds,

Martin
Mark A. Parsons
2006-08-03 03:42:18 UTC
Permalink
The 'load database' command has a 'nounload' option which tells the
backupserver *NOT* to rewind the tape after completing a database load.
The objective being to allow you to run additional 'load database' commands
without the overhead of rewind/scan-ahead to find the next dump file.

Sooooo ... I'm wondering if you could load the first dump file into a dummy
database (if small enough, just load into your target database), making
sure to use 'nounload' ... once that load is completed try issuing another
load and see if it'll read the 2nd dump file.

I'm assuming you've run 'load database ... with listonly' to verify that
the headers on the 2 dump files are identical?
Post by unknown
The following situation has happened in my case due to an
error by the user
"If you perform two or more dumps to a tape device and use
the same file name for both dumps (specified with the
FILENAME parameter), Adaptive Server appends the second dump
to the archive device. You will not be able to restore the
second dump because Adaptive Server locates the first
instance of the dump image with the specified file name and
restores this image instead. Adaptive Server does not search
for subsequent dump images with the same file name."
How can i recover my second dump
Rgds,
Martin
Bret Halford
2006-08-03 16:23:43 UTC
Permalink
I have used the following procedure a few times over the past decade,
generally with success.

When you dump a DB on tape, you will have in fact 3 "files" on the tape
for each dump, one for "header", one for "data" and one for "trailer/end".

So if you have dumped 20 times to a tape, you will have 20*3
files on the tape.If you want to reload the last one (and have given the same
name for each
dump) you have to build a new tape:

1- get the first "header" (that is different than next header)
% dd if=/dev/rmt/0lbn of=/tmp/header01 bs=2048
where 'if=' is the name of his tape device without rewind on close
(letter 'n' in '0lbn') and where 'bs=' is the block size. I put 2048, because
I have used
this value duing my dump command.
2- skip the rest of the first dump
% mt -f /dev/rmt/0lbn fsf 2
where 'fsf' is to forward the tape and '2' is to do it 2 times.
3- skip dump #2 to dump #19 (exemple in csh)
% foreach i (2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)
? mt -f /dev/rmt/0lbn fsf 3
? end
where 'fsf' is to forward the tape and '3' is to do it 3 times.
4- skip the "header" of the wanted dump.
% mt -f /dev/rmt/0lbn
5- get the "data" of the wanted dump
% dd if=/dev/rmt/0lbn of=/tmp/data20 bs=2048
6- get the "trailer" block of the wanted dump
% dd if=/dev/rmt/0lbn of=/tmp/trail20 bs=2048

now with theses files, build a new tape : (dont use the same tape, in case of
...)

1- rewind the tape (to be sure)
% mt -f /dev/rmt/0lb rewind
2- copy the "header" onto the tape :
% dd if=/tmp/header01 of=/dev/rmt/0lbn bs=2048
where 'bs=' is the block size, customer may adjust this value.
3- copy the "data" onto the tape :
% dd if=/tmp/data20 of=/dev/rmt/0lbn bs=2048
4- copy the "trailer" block onto the tape :
% dd if=/tmp/trail20 of=/dev/rmt/0lbn bs=2048
5- rewind the tape
% mt -f /dev/rmt/0lb rewind

now you may be able to load database using the new tape.

Loading...