Query only Inactive files TSM CLient

SvanJr

Newcomer
Joined
Dec 3, 2015
Messages
2
Reaction score
0
Points
0
PREDATAR Control23

Hi! We have a problem where we need to change Fileservers, and also Folderstructure for those files. We buy the TSM service from central IT, and we need to keep the inactive files in the backupset for 300days. We dont want to have to keep the whole backupset just to be able to restore Inactive files for 300 days. Its a lot of money for that.
So my question is this: How can I query my node to see what files is inactive? I have 12 000 000 files, so dont want to look for A/I I for every file, but need to sort out only the Inactive files somehow. Preferible export it to a csv.

Bonus question: How do you guys do a new servermove or new folder structor without doubling the data in TSM?
 
PREDATAR Control23

Do want to query the backupset for inactive only? If so, that's not possible to get inactive only. You can redirect the output to a file and then import in Excel, then filter.

If you want to query the TSM Server, then you could do:
Code:
select filespace_name,hl_name,ll_name,backup_date from backups where node_name='NODENAME' and state='INACTIVE_VERSION'
 
PREDATAR Control23

Bonus. Hard to do because TSM doesn't know you replaced a machine, it could be just a new machine. So the data is technically different if the source is different.

Only way is to have same hostname, same nodename, same file systems and same directory structure. Furthermore, the data has to be copied in a manner that all file permissions are the same, which if a Windows machine is near impossible.

I found on Windows machines, the best way is to backup the original, then restore to the new, including the system state otherwise, the machine_sid will be different, therefore permissions will appear different and those files will be backed up again.
 
PREDATAR Control23

I dont have access to TSM Server to do SQL querys.

How do I redirect the output to file? I have tried "q b e:\somefile\somefile\ -inactive > c:\log.txt" but it doesnt work. My thought was that if I could single out all inactive files, then I could do a restore of all inactive files to disk, and then a restore of the active files to new server, and just have the inactive files as archive until 300 days have passed.

Thanks for your help
 
PREDATAR Control23

I have tried "q b e:\somefile\somefile\ -inactive > c:\log.txt" but it doesnt work.
You have the right idea, but you have to do it from a Windows Command Prompt not a TSM Command-Line.
Code:
cd /d "c:\program files\tivoli\tsm\baclient"
dsmc query ...   > c:\log.txt
 
PREDATAR Control23

then I could do a restore of all inactive files to disk
You cannot do that if you have multiple versions of the same file. The end result is that you will only have 1 version, the last one restored, not necessarily the most recent or the oldest inactive either. What happens is that when you do the restore, the TSM Server determines the best tape order to get all that data, and then the client restores all those files. If you select overwrite=yes, it will restore each version it encounters overwriting the previous and you end up with the last one restored. With overwrite=no, you get the first one restored and the others are skipped.

You really need access to the TSM Server or get the TSM Administrator to do this. You would need to either do an EXPORT NODEDATA or GENERATE BACKUPSET in order to have all the versions. You will get active and inactive, but that's the price to pay to get all the inactives.
 
Top