cancel
Showing results for 
Search instead for 
Did you mean: 

list media used from list of files

Hi,

How do I list medias/tape labels common by around 500 pdf files from seperate subfolders via cli?

Finding and checking one-by-one the clicking preview to get tape labels wuld take hours. Worse case, java client crashed and I had to do it all over again.

Tags (2)
1 Solution

Accepted Solutions
Accepted Solution!

Re: list media used from list of files

@papazolla 

The way that NBU stores backup info makes this a bit of an effort - the same way that the GUI needs to do it.
When you start with 'Browse for Backups', you provide sufficient info (Client name, Policy type, Date range) for NBU to locate the backup headers for images that match the criteria - see this as bpimagelist command. When you locate a specific backup (image-id), NBU uses this info to browse for files - this performs bplist in the background.
When you select 'Preview Media', NBU goes back to the image header where the media id is stored.

The easiest will be is to know when the backup was taken and some additional info to narrow down the info (Policy name, Sched name, etc. .
If you know the start-date of the backup, make the start and end-date the same, as NBU links image info to backup start timestamp.

bpimagelist -client clientname -d mm/dd/yyyy -e mm/dd/yyyy -media -U

If the files you are looking for is part of a backup set that spanned multiple tapes, it will list all tapes in the backup set - similar to what 'preview media' does.

Sorry - nothing quick about this...
If you need to recall tapes for a restore of all files, best to search for all tapes used for the client for a period/date where all files would've been backed up, bring all tapes onsite, insert into library when requested by the restore.

View solution in original post

2 Replies
Accepted Solution!

Re: list media used from list of files

@papazolla 

The way that NBU stores backup info makes this a bit of an effort - the same way that the GUI needs to do it.
When you start with 'Browse for Backups', you provide sufficient info (Client name, Policy type, Date range) for NBU to locate the backup headers for images that match the criteria - see this as bpimagelist command. When you locate a specific backup (image-id), NBU uses this info to browse for files - this performs bplist in the background.
When you select 'Preview Media', NBU goes back to the image header where the media id is stored.

The easiest will be is to know when the backup was taken and some additional info to narrow down the info (Policy name, Sched name, etc. .
If you know the start-date of the backup, make the start and end-date the same, as NBU links image info to backup start timestamp.

bpimagelist -client clientname -d mm/dd/yyyy -e mm/dd/yyyy -media -U

If the files you are looking for is part of a backup set that spanned multiple tapes, it will list all tapes in the backup set - similar to what 'preview media' does.

Sorry - nothing quick about this...
If you need to recall tapes for a restore of all files, best to search for all tapes used for the client for a period/date where all files would've been backed up, bring all tapes onsite, insert into library when requested by the restore.

View solution in original post

Re: list media used from list of files

Thanks for the detailed explaination.