• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.


    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Query only Inactive files TSM CLient

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?


ADSM.ORG Moderator
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:
select filespace_name,hl_name,ll_name,backup_date from backups where node_name='NODENAME' and state='INACTIVE_VERSION'


ADSM.ORG Moderator
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.
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


ADSM.ORG Moderator
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.
cd /d "c:\program files\tivoli\tsm\baclient"
dsmc query ...   > c:\log.txt


ADSM.ORG Moderator
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.

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 17 19.5%
  • Keep using TSM for Spectrum Protect.

    Votes: 53 60.9%
  • Let's be formal and just say Spectrum Protect

    Votes: 10 11.5%
  • Other (please comement)

    Votes: 7 8.0%

Forum statistics

Latest member