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

Searching for a file

prentmee

ADSM.ORG Member
#1
User deleted a file. I know the name of the file but not the location beside in the /vault dir.
RHEL server.

tried:
dsmc res -pi -ina -subdir=yes "/vault/*/*/filename"
dsmc res -pi -ina -subdir=yes "/vault/.../filename"

any suggestions?

thanks for the help
-pete
 

LED888

ADSM.ORG Moderator
#2
If the file was backed up via the schedule daemon.
Can check the dsmsched.log , it should have the path for the file in question.

Good Luck,
Sias
 

prentmee

ADSM.ORG Member
#3
unfortunately the dsm.opt is set to quiet. Only got errors in the dsmsched.log.
There has to be a way to search without wading through miles of filesystems.
inside /vault is 11 directories all 1 terabyte in size. it would take forever to search for it. Also the clock is ticking. this file was deleted some time in March. I only have 60 days before retention deletes forever.
 

hogmaster

ADSM.ORG Senior Member
#4
Hi.
I would yous the query backup comman dform the client to get the information. like this.
dsmc q backup -subdir=yes -filseonly "/vault/filename"

Note that you can skip ... and asterisk (*) when using the -subdir=yes option the -filsonly option help to speed the query up, it will only check files.

Good luck /hogmaster
 

TiborB

ADSM.ORG Senior Member
#6
as a admin, you can list all backed up files via

select * from backups

maybe some custom select could find you what you are looking for
 

marclant

ADSM.ORG Moderator
#7
as a admin, you can list all backed up files via

select * from backups

maybe some custom select could find you what you are looking for
It could look like:
Code:
select * from backups where node_name='NODENAME' and filespace_name='/vault' and lcase(ll_name)='filename'
the nodename has to be in uppercase. The filespace in the same case as in the Q FI output, and the filename in lowecase. Forcing the query to change the filename to all lowercase to query it, because I assume if the user doesn't remember in which directory he deleted the file, he may also not remember if there was upper and lower case characters.

And if there's a chance he's not entirely sure of the spelling either, you could use wildcards:
Code:
select * from backups where node_name='NODENAME' and filespace_name='/vault' and lcase(ll_name) like 'file%'
Or you could do:
dsmc query backup /vault/* -su=yes -filesonly | grep -i filename
 

LED888

ADSM.ORG Moderator
#8
...dsmc query backup /vault/* -su=yes -filesonly | grep -i filename...
I do not recall nor does the TSM Client Manual indicate that we can use the | grep. Have not got a chance to try it out on one of the test system.
Grep is a Unix/AIX/Linux command.

Can redirect the output into a file and then perform the search.

dsmc query backup /vault/* -su=yes -filesonly > /path/file_name

grep "text string to search” directory/path/file_name

Good Luck,
Sias
 

marclant

ADSM.ORG Moderator
#9
I do not recall nor does the TSM Client Manual indicate that we can use the | grep. Have not got a chance to try it out on one of the test system.
Grep is a Unix/AIX/Linux command.
Pretty much any command executed in a Unix/Linux Shell can be piped to another command. It's independent of TSM, grep is just parsing dsmc's output.

I tested and it works:
upload_2016-4-11_13-29-30.png

On change though:
Code:
dsmc query backup "/vault/*" -su=yes -filesonly | grep -i filename
AIX tries to parse the *, so the path needs to be in double-quotes
 

LED888

ADSM.ORG Moderator
#10
Ah.. it does not work within the dsmc console!
The trick is being in the Unix shell!
Cool! Thank you!
Got too many os's in my head.

-Sias
 

prentmee

ADSM.ORG Member
#11
querying the backup seems to be working. I still haven't found the file. I added an -ina to the command because the user deleted it.
I'm not even sure the file ever made it through a backup, so I may not even have the file. You got to love users.

Thanks for the help.

-pete
 

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

    Votes: 23 52.3%
  • Let's be formal and just say Spectrum Protect

    Votes: 8 18.2%
  • Other (please comement)

    Votes: 4 9.1%

Forum statistics

Threads
31,058
Messages
132,247
Members
21,273
Latest member
ctauber
Top