Unfortunately identifying these files will be a nasty task.
The data you want is in the "backups" table. That table stores the state of an object (active/inactive) and the deactivate date. The problem is that, whilst the "active" state represents data which existed on the client at the time of the last backup, the "inactive" state represents both existing files with newer backup versions
plus deleted files.
You might be best off selecting out the entire backups table to a CSV file which you then import into a seperate database (postgres/mysql etc) and then run your SQL. For a start you can create additional indices to speed up your select...
Please don't run this against a production TSM server unless you'd like your select statement to run for a month and cause some chaos while it does so!
You're going to want to run something like...
Code:
select node_name, hl_name, ll_name
from backups
where
object_id not in (select object_id from backups where state='ACTIVE')
Disclaimer: I'm not sure whether the "object_id" is unique to a node, or across the whole TSM instance...can't run a test today, sorry about that.
That having been said...the select above can't actually be used to selectively (hur hur) move data around. It seems like you want to implement a long-term archive of some sort for ancient data. You might like to look at the MigDelay stgpool parameter...you'll need to tweak things a bit to ensure that all objects on a particular volume are capable of being migrated, but its probably do-able.
As Jeff has mentioned backup isn't really the way to go for LT archive. You might like to try archiving the data (if there is a procedural option available to execute the archive immediately before the purge).
Cheers,
T