• 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.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    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.

Dates/times for all backed up files on a volume?

ldmwndletsm

ADSM.ORG Member
Joined
Oct 30, 2019
Messages
163
Reaction score
1
Points
0
Well, I suppose that I could run something exhausting like `query content volume`, grabbing the following three fields for every entry:

Node Name
Filespace Name
Client's Name for File

From this, I could then extract the path and filename from 'Client's Name for File' using something as simple as the Unix dirname and basename commands. Next, I could run something like this for each of these:

select * from backups where node_name='Node Name' and FILESPACE_NAME='Filespace Name' and HL_NAME='/path_from_dirname /' and LL_NAME='filename_from_basename'

and this would give me the OBJECT_ID and BACKUP_DATE for each entry on the tape.

I could script this using Unix shell or Perl, but seems ludicrous. There must be more efficient SQL witchcraft to accomplish this, but I'm not versed enough with SQL (complex joins and such) or all the sundry tables where things are stashed away to make this trivial or to do it in the most efficient manner. Then again, maybe it's easier than I suspect.

It's unfortunate that TSM doesn't just include the date/time field in the content information for the volume. Seems that would make more sense.

And suppose that I just want a listing of the file spaces, not the actual file names, on a volume. So, if I run:

query content volume | grep 'Filespace' | sort -u

then, yes, that would work, but it takes forever because TSM tracks everything down to the file level or individual object. It would be nice if it also included a list of just the file spaces in another table for the tape so you could quickly list them out.
 

marclant

ADSM.ORG Moderator
Joined
Jun 16, 2006
Messages
3,602
Reaction score
578
Points
0
Location
Canada
Website
www-947.ibm.com
This could work:
SQL:
select contents.*,backups.backup_date from backups,contents where contents.object_id=backups.object_id
Could add other critieria to the where clause like and volume_name='VOLUME'and/or and contents.node_name='NODE'

I could not test on a large server, so I have no idea if this will run efficiently or not.
 
Last edited:

AngeloDeAngelis

Active Newcomer
Joined
May 3, 2019
Messages
9
Reaction score
1
Points
0
Location
USA
Website
www.ibm.com
Could start with this:

select contents.*,backups.backup_date from backups,contents where contents.object_id=backups.object_id and volume_name='/Spectrum/file/000003C0.BFS'
 

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: 18 18.4%
  • Keep using TSM for Spectrum Protect.

    Votes: 60 61.2%
  • Let's be formal and just say Spectrum Protect

    Votes: 12 12.2%
  • Other (please comement)

    Votes: 8 8.2%

Forum statistics

Threads
31,738
Messages
135,308
Members
21,740
Latest member
mjkoz
Top