Searching for a file

prentmee

ADSM.ORG Member
Joined
Apr 14, 2011
Messages
20
Reaction score
0
Points
0
Location
Wrightstown WI
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
 
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
 
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.
 
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
 
Hi,
Rememeber that /.../ is for include-exclude only, not for file specifications.
 
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
 
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
 
...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
 
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
 
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
 
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
 
Back
Top