469,935 Members | 1,983 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,935 developers. It's quick & easy.

tablespace / container info from a backup image

It is possible that we may be asked to restore a production tape, say 3
yrs later. We would prefer
redirect restore for that. I am documenting a process to do a redirect
restore. We take production backups via Legato.

The big question is that how to get information about tablespace and
containers from the tape backup. A search on this told me that db2ckbkp
is the command to go for. I tested it on a backup residing on unix file
system and it worked. But I want to know how db2ckbkp works on tape
backup (say /dev/rmt0) or legato backup.

I see following problems with db2ckbkp

(1) db2ckbkp works only on backup image. So we need to have the
information of backup image.

db2 list history backup since 200610011234 for dbname tells where
the backup was taken,
but does not tell the image name.

(2) To get the image name it seems we have to run the following command

db2ckbkp -h -a backup_image_name

Isn't that a catch 22 situation. How can we give the image name as
a parameter
to db2ckbkp if the output of that command is suppose to tell us the
image name.

Also how does it work with tape or legato backup.

If a solution is found for the above two questions, dbk2ckbkp -T
backup_image_name
can tell the tablespace name and all containers information.

TIA.

Oct 18 '06 #1
3 4073
Db2 version is 8.2.3 on SunOs 5.9

dc********@aim.com wrote:
It is possible that we may be asked to restore a production tape, say 3
yrs later. We would prefer
redirect restore for that. I am documenting a process to do a redirect
restore. We take production backups via Legato.

The big question is that how to get information about tablespace and
containers from the tape backup. A search on this told me that db2ckbkp
is the command to go for. I tested it on a backup residing on unix file
system and it worked. But I want to know how db2ckbkp works on tape
backup (say /dev/rmt0) or legato backup.

I see following problems with db2ckbkp

(1) db2ckbkp works only on backup image. So we need to have the
information of backup image.

db2 list history backup since 200610011234 for dbname tells where
the backup was taken,
but does not tell the image name.

(2) To get the image name it seems we have to run the following command

db2ckbkp -h -a backup_image_name

Isn't that a catch 22 situation. How can we give the image name as
a parameter
to db2ckbkp if the output of that command is suppose to tell us the
image name.

Also how does it work with tape or legato backup.

If a solution is found for the above two questions, dbk2ckbkp -T
backup_image_name
can tell the tablespace name and all containers information.

TIA.
Oct 18 '06 #2
Check this command....it should give information about the BACKUPS in
TAPES...etc also

This utility can also verify backup images that are stored on tape
(except images that were created with a variable block size). This is
done by preparing the tape as for a restore operation, and then
invoking the utility, specifying the tape device name. For example, on
UNIX based systems:
db2ckbkp -h /dev/rmt0
and on Windows:
db2ckbkp -d \\.\tape1
If the image is on a tape device, specify the tape device path. You
will be prompted to ensure it is mounted, unless option '-n' is given.
If there are multiple tapes, the first tape must be mounted on the
first device path given. (That is the tape with sequence 001 in the
header).
The default when a tape device is detected is to prompt the user to
mount the tape. The user has the choice on the prompt. Here is the
prompt and options: (where the device I specified is on device path
/dev/rmt0)

Please mount the source media on device /dev/rmt0.
Continue(c), terminate only this device(d), or abort this tool(t)?
(c/d/t)
The user will be prompted for each device specified, and when the
device reaches the end of tape.

Related reference
db2adutl - Managing DB2 objects within TSMCommand

Cheers..
Shashi Mannepalli
dc********@aim.com wrote:
It is possible that we may be asked to restore a production tape, say 3
yrs later. We would prefer
redirect restore for that. I am documenting a process to do a redirect
restore. We take production backups via Legato.

The big question is that how to get information about tablespace and
containers from the tape backup. A search on this told me that db2ckbkp
is the command to go for. I tested it on a backup residing on unix file
system and it worked. But I want to know how db2ckbkp works on tape
backup (say /dev/rmt0) or legato backup.

I see following problems with db2ckbkp

(1) db2ckbkp works only on backup image. So we need to have the
information of backup image.

db2 list history backup since 200610011234 for dbname tells where
the backup was taken,
but does not tell the image name.

(2) To get the image name it seems we have to run the following command

db2ckbkp -h -a backup_image_name

Isn't that a catch 22 situation. How can we give the image name as
a parameter
to db2ckbkp if the output of that command is suppose to tell us the
image name.

Also how does it work with tape or legato backup.

If a solution is found for the above two questions, dbk2ckbkp -T
backup_image_name
can tell the tablespace name and all containers information.

TIA.
Oct 18 '06 #3
UNIX based systems:
db2ckbkp -h /dev/rmt0
we use legato for backups.

for restore we use the following command

restore db dbname load /usr/lib/libnsrdb2.o INTO newdbname
and it works. The load refers to the shared library of legato.

I tried the following:

db2ckbkp -H /usr/lib/libnsrdb2.o

I got the following error:

ERROR - Unable to migrate media header from image
ERROR: Failed to verify media header. Cannot continue.

I am frustrated with this problem. Isn't there an easy way of findout
out the tablespaces and container information from a given backup
set (disk, tape or vendor).

Oct 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by cbielins | last post: by
2 posts views Thread by Raghava | last post: by
2 posts views Thread by db2dude | last post: by
2 posts views Thread by vj_dba | last post: by
1 post views Thread by Sam Durai | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.