Finding the exact tape needed

DanGiles

ADSM.ORG Senior Member
Joined
Oct 25, 2002
Messages
626
Reaction score
17
Points
0
Location
Toronto, Ont. Canada
When you ask TSM to restore a specific file, it knows exactly where it is. I cannot, however, figure out which tables will tell you that. I imagine you get the object id from the BACKUPS table, but then where do you go to get the tape?

Thanks!
 
Not sure what version of TSM Server that we are running.

TSM 5 & 6 - The following should list the volume(s) of a file for a specific node.
select volume_name from contents where file_name='file_name' and node_name='NODE_NAME'

Spectrum..
q nodedata

If the above don't help.
From the TSM Client, issue a restore, and check the actlog on the TSM Server to see what tape is being requested.

Good Luck,
Sias
 
Hi Daniel,
I use this command to list specific files per tape from the contents table:
Code:
dsmadmc -tcpserver=*** -id=*** -pa=*** -commadelimited "select volume_name, file_name, filespace_name, file_size, segment from contents where (volume_name = 'SP0857L6' and (file_name like '%%xxx%%') order by file_name"

With TSM versions >= 7 it should be possible to query the whole CONTENTS table without causing excessive load, but I did not yet dare this. On TSM 5.x such a query could run for hours :oops:
 
Hi Daniel,
I use this command to list specific files per tape from the contents table:
Code:
dsmadmc -tcpserver=*** -id=*** -pa=*** -commadelimited "select volume_name, file_name, filespace_name, file_size, segment from contents where (volume_name = 'SP0857L6' and (file_name like '%%xxx%%') order by file_name"

With TSM versions >= 7 it should be possible to query the whole CONTENTS table without causing excessive load, but I did not yet dare this. On TSM 5.x such a query could run for hours :oops:

Your reply is not what Dan was asking - he wants to know the volume name. Your script assumes you know the volume name already.
 
It's easy to get a list of tapes that belong to a node from the volumeusage table. I need to be more specific. The contents table though points to the solution. From the backups table I can get the object ID, then use that to index into the contents table to get the date.
 
Back
Top