Video Screencast Help

Find out the exact backup id(s) associated with specific files/folders that have been backed up

Created: 05 Feb 2012 • Updated: 07 Feb 2012 | 11 comments
RLeon's picture
This issue has been solved. See solution.

Hi all,

When I configure a restore in BAR for a client, say, for the MS-Windows policy type, I can select a specific folder or file, click Actions > Preview Media and it would tell me which media id(s) the folder/file is associated with.
Since BAR knows which media id(s) my selected file is stored in, it obviously knows which backup id(s) (image id) the file is associated with. Because if it doesn't, then it shouldn't be able to tell me which media id(s) the file is stored in.

What I want to find out, is the backup id(s) associated with the file I selected for restore.
The Preview Media option in BAR only tells me the associated media id(s) for the file, but I also want to know its associated backup id(s).

If I use the "Images on Tape" report, or the catalog "verify" feature against a media id, it would tell me all the backup ids associated with that media id.
But picture this problem:
A single backup policy backs up one client: somesvr
The selection list contains different drives and folders for somesvr.
If the media ABC011 contains ten backup ids, and they all begin with somesvr_xxxxxxxxxx (x = ctime code).
Then which backup id(s) out of the ten contains the file C:\test.txt on the server "somesvr" ?
In BAR, if I select the file C:\test.txt (for a specific day and time), then use Preview Media, it tells me this file is stored in ABC011.
But the problem is, I want to know which backup id(s) out of all backup id(s) inside ABC011 this file is really associated with.

Thanks for your time!

P.S. I know I could use bpflist to find out what folder/files each backup id contains, but I consider this an inefficient solution when I have hundereds of backup ids to go through.

RLeon

Comments 11 CommentsJump to latest comment

VirtualED's picture

I believe OpsCenter in NetBackup 7.5 has a feature that will help with this.  Outside of that, there is no easy way to perform this except to search each image one by one.

Omar Villa's picture

VirtualED is right only a bpflist or bplist will be help you out, getting the images and tapes is easy with bpimagelist but once you got the image you will need to read each one and dump the list of files, either with this will be hard to determine exactly which tape to use until you run a restore because bplist will not give you the exact tape, so sorry no easy exit.

Omar Villa

Netbackup Expert

Twiter: @omarvillaNBU

 

Mark_Solutions's picture

If you are on windows you could do the following which will return the images that contain a particular file, followed by a list of all files contained in that image.

This example if just for somesrv and looking for test.txt

Go to a command line and CD to program files\veritas\netbackup\db\images\somesrv\

findstr /s /i test.txt *.*

It doesnt actually pin it down to a directory but it is usually pretty quick

The first line it displays will be the folder it is found in followed by the image name with _FULL.f (or similar) on the end, but it will pin down the image ID(s) that the file exists in.

You can also go up to the root of the images directory and run this and it will find it on any client

Hope this helps - obviously there is the equivalent for UNIX (strings and grep)

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

RLeon's picture

Hi VirtualED and Omar,

Thank you both for your input.

So then, there really isn't an easy way to do this?
I mean, BAR obviously knows which tape the file is stored in, which heavily implies that it knows exactly which backup id the file is associated with. (Because without knowing the backup id, it wouldn't know which tape the file is in!)
So even though BAR knows it, there isn't a way to make it tell me the backup id?

In case you are wondering why I need this feature, sometimes we need to expire backup ids for security reasons. We expire certain backup ids that are associated with certain "sensitive" files, so that these files will no longer show up in BAR for restore. (We know we could still import them back from tape, but that's not the point, and we are aware of this potential security loop hole.)
We are aware that by expiring a backup id, we may get rid of more than just our target file, but sometimes it has to be done, and we accept it.

Currently our only way to identify these backup ids:
1. Select the file we want in BAR (backed up on a particular date/time)
2. Use "Preview Media" to find out which media id it is stored in
3. Use the catalog to list all backup ids associated with this media id
4. Use bpflist on ALL these backup ids, one by one, to find the exact backup id that is associated with our target file
5. Expire the backup id
6. Success - The file doesn't show up in BAR for restore anymore

To Mark_Solutions:
Just saw your reply as I'm posting, will try your suggestion and report back.
But then again, I still can't believe this is not built in to Netbackup!

Thank you all for your help,

RLeon

Mark_Solutions's picture

NetBackup 7.5 will have an indexing engine of sorts - life will be easier then - only a few days to wait now!

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

RLeon's picture

Hi Mark_Solutions,

I tried your suggestion:
>Go to a command line and CD to program files\veritas\netbackup\db\images\somesrv\
>findstr /s /i test.txt *.* > D:\abc.txt
(I redirected the results to abc.txt)

You are right in saying that I can dig inside abc.txt to find all the backup ids associated to the file test.txt.
I tested your method for some clients and it worked wonderfully.
But then this method only works if the total amount of granule data (files/folders) that has been backed up is low.

In our case, the resulting size of the abc.txt after running the findstr command (for a file we target) come close to 16GB for a client.
It is so big I can't even open the file in any text readers.

Do you have any other suggestions?

I understand that version 7.5 may make this easier, but it may be months or years until we decided to upgrade from 7.0.

P.S. In case you are wondering how the abc.txt could go up to 16GB, our "program files\veritas\netbackup\db\" directory alone is around 200GB (including all sub directories). We have a massive Netbackup environment.

Thanks,

RLeon

Marianne's picture

Mark is currently unable to login and has asked me to post on his behalf:

 " I have cracked the command now and you just need to add the /m switch to the command so that it reports the file name only and not its contents:

findstr /s /i /m test.txt *.* > D:\abc.txt "

 

Mark has apologised for not being able to post earlier.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

SOLUTION
RLeon's picture

Marianne and Mark,

With the /M switch, everything is working as intended now! Thank you so much.

I think my thread question is fully answered and solved.

Now to the last question... Who's post shall I mark as solution?

Thanks,

RLeon

Marianne's picture

I will PM the Admins.

The '/m' post deserves the solution, but Mark deserves the points.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

Mark_Solutions's picture

Thanks Marianne and Swathi

Glad to have helped RLeon - and it is good to be back and logged in!

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.