I have a pretty large and ancient NetBackup 7.5 archive, which has about 20k pieces of media associated with it, and has all of our permanent archives in it.
I have to restore several thousand files from this system, which span several years of the archive.
Because we multiplexed our archives, the backup images that contain these files span a lot of tapes.
When we kick off restores, NBU will present a list of all the tapes needed to restore the entire backup image, at the top of the restore log, which can be many 10s of tapes, even though we are only looking to restore a single file from that backup image.
Because of this, we end up loading a ton of extraneous tapes that are not needed to restore the single file.
What I am looking for is a way to identify what specific tape contains the file in question being restored.
NBU knows what this is, as it will go directly to the tape needed, load it, restore the file, then complete the job, ignoring all of the other tapes that were loaded.
I am wondering how I can get to that information, so I can load just the one tape that contains the single file I am looking for. I know Device Manager will sit there asking for a specific tape it is looking for, so that would work - however, since I need to restore several thousand individual files, I cannot sit there and wait for Device Manager to pop it's request, then go load the tape, then wait for the next request from Device Manager. I need to be able to find and pre-load these tapes into the robot, so the jobs just up and go.
Any ideas on this one?
Thanks a ton in advance!
If you are using the GUI to select the files, once you identify a file you should also be able to determine the backup date, with the backup date and the client you should be able then to run bpimagelist command to determine the media used (e.g. bpimagelist -client <client> -d < backupdate > -e < backupdate >) - this should return only the single backup image related to the file you wish to restore.
There may be others (simpler) ways to achieve the same result (there are usually multiple ways to find information in NetBackup).
Thank you David, I think I might be able to script your logic together in such a way that I send the script the path, it does the lookup to get the backup date, then feeds that into bpimagelist to get the specific tape used.
I'll give that a shot and report back!
Thanks a ton!
So seems like this method will not work.
In the attached screen shot, we can see I have selected a single file for restore, and then hit the 'preview' button, which brings up a list of all the tapes that have data from the backup image which includes the file in question.
It's listing 7 tapes (LTO5 media, fwiw) and the file to be restored is about 50kb in size.
If I extract the backup date for that file down to the second, and then pass that into bplist, I still get back that same list of 7 media - actually I get more, as there were multiple backup jobs running for that same policy at that same time. It seems that bplist stamps the same date/time on all media that are part of the backup image:
root@ndmpmaster:~ > bpimagelist -client backuphost -d 01/18/2017 20:00:39 -e 01/18/2017 20:00:39 -media -idonly -U
Media ID On Hold Last Written Server
-------- ------- ---------------- ----------
A00428 0 01/18/2017 20:00 backuphost
A00446 0 01/18/2017 20:00 backuphost
A00449 0 01/18/2017 20:00 backuphost
A00450 0 01/18/2017 20:00 backuphost
A00445 0 01/18/2017 20:00 backuphost
A00440 0 01/18/2017 20:00 backuphost
A00487 0 01/18/2017 20:00 backuphost
N82414 0 01/18/2017 20:00 backuphost
N79721 0 01/18/2017 20:00 backuphost
N83629 0 01/18/2017 20:00 backuphost
N83702 0 01/18/2017 20:00 backuphost
N84133 0 01/18/2017 20:00 backuphost
N83771 0 01/18/2017 20:00 backuphost
N83744 0 01/18/2017 20:00 backuphost
N83832 0 01/18/2017 20:00 backuphost
N85199 0 01/18/2017 20:00 backuphost
N85250 0 01/18/2017 20:00 backuphost
N85326 0 01/18/2017 20:00 backuphost
what I'm hoping to be able to find out, is what exact tape that 50kb file is on, out of those 7 tapes listed.
NetBackup knows this, if all 7 tapes are loaded for this restore, it will go to the single tape required, load it and run the restore. So the information is available to NetBackup itself, I just can't figure out how to extract it for my own use.
So for this example, is the file part of a very large backup that spans multiple tapes? Okay, not sure if this will help (I don't have anything I can test this against, my test environment only has disk STU targets).
Try using the bpflist command "bpflist -backupid <BackupID> -rl 99 -L" - search for the file path and see if one of the fields in the output provides the information you need (here's an article describing the output fields https://www.veritas.com/support/en_US/article.100016517)
You may be able to determine which tape from this, although you may need to look at the bpimagelist output to determine/relate the copy fragment number (and specific tape) to the bpflist output.
Thank you David!
Yes we have a lot of very large multiplexed backups, so they span a ton of tapes. And with this very high number of individual file restores we are faced with, we will end up loading literally thousands of tapes, 90% of which will not be touched during the restore process - so we are looking to home in on the specific tapes that we need, and load just those.
Anyway I will give this a shot and report back!
Thanks again for all your help!