cancel
Showing results for 
Search instead for 
Did you mean: 
sdo
Moderator
Moderator
Partner    VIP    Certified

Sometimes it's not easy to quickly determine which images contain specific drives/volumes/folder-sets.

Here's a simple reporting script which will list backup images, and the first 'name' entry at the top of the backup image contents.

 

Comments
sdo
Moderator
Moderator
Partner    VIP    Certified

Here's an example of the script running.

Notice how, during the first run of the script, that the script fails to list the first entry for one of the images - but how, during the second run it does succeed at listing the image.  This is because the script tries very hard not to list the images too deeply, and so during the first run the script lists only to depth 1, and the script detected that this failed, and so the script has made a note to itself to run at depth 2 for any subsequent runs.

J:\NBU_SCRIPTS\whats-at-top-of-full-images>whats-at-top-of-full-images.bat

...please wait a few moments...
...performing a one-time image idonly collection, for previous month, so that date format can be determined...
...processing list...
...done...
...the bpimagelist output has UK date format...
...the bplist input has UK date format...

_Enter a client name (name,EXIT) [master01]  :
_Enter days ago to look back (nnn,EXIT) [20]  :
_Enter policy type (NDMP,Standard,Windows,EXIT) [Windows]  :

Images:  bpimagelist -idonly -hoursago 480 -client master01 -pt MS-Windows -st FULL

Date       Time       Image Name                          Top Of Image
-------------------   ----------                          ------------
...failed, status `227`, command:  bplist -s 13/02/2016 09:07:13 -e 13/02/2016 09:07:13 -C master01 -t 13 -PI -R 1 -nt_files *
13/02/2016 09:07:13   master01_1455354433                 unable to determine
12/02/2016 09:00:00   master01_1455267600                 J:\NBU_MANUALS\
10/02/2016 09:00:00   master01_1455094800                 J:\NBU_MANUALS\
28/01/2016 20:25:57   master01_1454012757                 J:\NBU_MANUALS\

Script completed...

Press any key to continue . . .
.
.
.
J:\NBU_SCRIPTS\whats-at-top-of-full-images>whats-at-top-of-full-images.bat

...please wait a few moments...
...processing list...
...done...
...the bpimagelist output has UK date format...
...the bplist input has UK date format...

_Enter a client name (name,EXIT) [master01]  :
_Enter days ago to look back (nnn,EXIT) [20]  :
_Enter policy type (NDMP,Standard,Windows,EXIT) [Windows]  :

Images:  bpimagelist -idonly -hoursago 480 -client master01 -pt MS-Windows -st FULL

Date       Time       Image Name                         Top Of Image
-------------------   ----------                         ------------
13/02/2016 09:07:13   master01_1455354433                J:\NBU_MANUALS\
12/02/2016 09:00:00   master01_1455267600                J:\NBU_MANUALS\
10/02/2016 09:00:00   master01_1455094800                J:\NBU_MANUALS\
28/01/2016 20:25:57   master01_1454012757                J:\NBU_MANUALS\

Script completed...

Press any key to continue . . .
Version history
Last update:
‎02-14-2016 04:34 AM
Updated by:
Moderator