cancel
Showing results for 
Search instead for 
Did you mean: 

Find tape/media where a particular backup client stored its data at a given day or month or year ?

NortonsFan
Level 4

Is there a way to find in which tape/media a particular file of a netbackup client  is currently stored for any given time frame requested? be it  for a given day or month or year ?

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Level 6
Partner    VIP    Accredited Certified

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

e.g bpimagelist –client xxxx –d 08/08/2010 –e 08/09/2010 -media

A00036 media-server 1281214014 173 442263104 3

A00032 media-server 1281214014 196 521824586 3

A00003 media-server 1281115775 391 274091728 3

A00016 media-server 1281114005 19 80206098 3

 

 

Note the following:

Column 1: media id

Column 2: name of media server that performed the backup

Column 3: Image number.

View solution in original post

9 REPLIES 9

mph999
Level 6
Employee Accredited

 

 
 
 
This would give a list of backups  - as opposed to using "hoursago" you can also specify between two dates, see man page for more options
root@womble 415-672-631 $ bpimagelist -hoursago 200 -idonly
 
Time: Wed Nov 02 09:37:01 2011   ID: womble_1320226621   UBAK (2)
Time: Wed Nov 02 08:40:06 2011   ID: womble_1320223206   UBAK (2)
Time: Fri Oct 28 11:59:56 2011   ID: womble_1319799596   FULL (0)
Time: Fri Oct 28 11:56:48 2011   ID: womble_1319799408   FULL (0)
Time: Thu Oct 27 12:38:22 2011   ID: womble_1319715502   FULL (0)
Time: Thu Oct 27 12:35:58 2011   ID: womble_1319715358   FULL (0)
Time: Thu Oct 27 11:26:39 2011   ID: womble_1319711199   FULL (0)
Time: Thu Oct 27 11:26:08 2011   ID: womble_1319711168   FULL (0)
 
 
Using womble_1319715358 as the exampe - lets check that the file we want is in there ...
 
 
 
root@womble 415-672-631 $ bpflist -ut 1319715358 -client womble -rl 999 -backupid womble_1319715358 -option GET_ALL_FILES
FILES 8 7          0 1319715358 0 womble CatBack_Tape womble_1319715358 - *NULL* 13 0 unknown unknown 0 0 NBDB:102:1319715344:F
1 0 48 57 8 1 0 0 257 /netbackup/nbu7102/openv/db/staging/DARS_DATA.db 33206 root root 26218496 1319715344 1319715352 1319715352
2 0 49 57 51219 1 0 0 257 /netbackup/nbu7102/openv/db/staging/DARS_INDEX.db 33206 root root 26218496 1319715344 1319715353 1319715353
3 0 47 57 102430 1 0 0 257 /netbackup/nbu7102/openv/db/staging/DBM_DATA.db 33206 root root 26218496 1319715344 1319715348 1319715348
4 0 48 57 153641 1 0 0 257 /netbackup/nbu7102/openv/db/staging/DBM_INDEX.db 33206 root root 26218496 1319715344 1319715350 1319715350
5 0 47 57 204852 1 0 0 257 /netbackup/nbu7102/openv/db/staging/EMM_DATA.db 33206 root root 26218496 1319715344 1319715346 1319715346
6 0 48 57 256063 1 0 0 257 /netbackup/nbu7102/openv/db/staging/EMM_INDEX.db 33206 root root 26218496 1319715344 1319715347 1319715347
7 0 45 56 307274 1 0 0 257 /netbackup/nbu7102/openv/db/staging/NBAZDB.db 33206 root root 2433024 1319715344 1319715344 1319715344
8 0 48 53 312029 1 0 0 257 /netbackup/nbu7102/openv/db/staging/NBAZDB.log.1 33206 root root 8192 1319715344 1319715344 1319715354
9 0 43 56 312048 1 0 0 257 /netbackup/nbu7102/openv/db/staging/NBDB.db 33206 root root 2629632 1319715344 1319715353 1319715353
10 0 46 54 317187 1 0 0 257 /netbackup/nbu7102/openv/db/staging/NBDB.log.1 33206 root root 98304 1319715344 1319715354 1319715354
11 0 50 51 317382 1 0 0 257 /netbackup/nbu7102/openv/db/staging/databases.conf 33152 root root 78 1319715354 1319715354 1319715354
12 0 47 52 317386 1 0 0 257 /netbackup/nbu7102/openv/db/staging/server.conf 33152 root root 174 1319715354 1319715354 1319715354
13 0 47 52 317390 1 0 0 257 /netbackup/nbu7102/openv/db/staging/vxdbms.conf 33152 root root 544 1319715354 1319715354 1319715354
 
 
 
If so, we can get the media multiple ways, I would do this :
 
 
root@womble 415-672-631 $ bpimagelist -backupid womble_1319715358 |grep FRAG |awk '{print $9}' |sort -u
 
R0TP00
 
If windows, then you'll have trouble with awk ...
 
From this output :
 
 
bpimagelist -backupid womble_1319715358
 
You will see this :
 
IMAGE womble 0 0 8 womble_1319715358 CatBack_Tape 7 *NULL* root Full 0 1 1319715358 130 1320924958 0 0 158720 13 1 1 0 CatBack_Tape_1319715358_FULL.f *NULL* *NULL* 0 1 0 0 0 NBDB:102:1319715344:F 0 0 0 0 0 0 0 *NULL* 0 0 0 *NULL* 104 0 0 6357 0 0 *NULL* *NULL* 0 0 0 0 *NULL* *NULL*
HISTO -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
FRAG 1 1 158720 0 2 12 1 R0TP00 womble 65536 2 1319715358 0 0 *NULL* 1320924958 0 65537 0 0 0 1 0 1319715488 0 *NULL* *NULL*
 
From all the FRAG lines, the '9th' field is the media.
 
Reagrds,
 
Martin (Symantec TSE, UK)

Andy_Welburn
Level 6

i.e. policy? client?

The only reason I ask is that you've previously asked similar questions regarding finding which client backed up which file etc!

If you know client & location of said file then the easiest solution would be to look in the BAR GUI & highlight the file as if about to restore & "preview media".

You could also use bpimagelist:

/usr/openv/netbackup/bin/admincmd/bpimagelist [-media] [-l |
     -L  |  -U  |  -idonly]  [-d date | -hoursago hours] [-e
     date] [-server server_name] [-keyword "keyword phrase"]
     [-client  client_name]  [-option  INCLUDE_PRE_IMPORT  |
     INCLUDE_TIR | LIST_COMPLETE_COPIES | LIST_OLD_TO_NEW  |
     ONLY_PRE_IMPORT  | ONLY_TIR] [-policy policy_name] [-pt
     policy_type] [-rl  retention_level]  [-sl  sched_label]
     [-st sched_type] [-M master_server[,...]] [-v]

e.g.

bpimagelist -media -idonly -client client -policy policy -d 11/02/2011 -e 11/04/2011

The more info you can throw at these commands the better.....

***EDIT***

I'll stop there as Martin's done the hard work!

Mark_Solutions
Level 6
Partner Accredited Certified

On Windows in a command line window if you are looking for a file named filename.ext you could  go to:

C:\Program Files\veritas\netbackup\db\images\<clientname>\

Then run:

findstr /s /i filename.ext *.*

This will pipe out the files containing that file plus that files details but it will list the client name and unix path so does give you a lot pretty quickly.

Not sure if this is quite what you wanted as you seem to want more variable (date etc.) so may need to enhance this a bit.

Marianne
Level 6
Partner    VIP    Accredited Certified

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

e.g bpimagelist –client xxxx –d 08/08/2010 –e 08/09/2010 -media

A00036 media-server 1281214014 173 442263104 3

A00032 media-server 1281214014 196 521824586 3

A00003 media-server 1281115775 391 274091728 3

A00016 media-server 1281114005 19 80206098 3

 

 

Note the following:

Column 1: media id

Column 2: name of media server that performed the backup

Column 3: Image number.

mph999
Level 6
Employee Accredited

Ahh, Marianne wins ....

 

Never noticed the -media option on bpimagelist before, there you go, you learn something new everyday.  As per my post at the top, if you wish to check the actual files in the backup, the bpflist command would be required I think, then use Mariannes command once you have confirmed the fie you want is there.

Martin 

NortonsFan
Level 4

Thank  you all for  the patience listening and posting. We appreciate your invaluable support

Thanks Marianne for the tips on identifying media used by a client on a given time.

I was updated in one of the symantec article that  "bpflist" is a undocumented command that should not be used.

and yes Andy, I have a following objective:

 to trace  "a given file" of  client to the tape where it has stored to be called from offsite for restore.

so if bpimagelist gives me the tape used by the client for the given time.

bpimagelist –client xxxx –d 08/08/2010 –e 08/09/2010 -media

Is there a command to scan this idenified media listed from bpimagelist, to precisely find where the file we are intended to restore excists, without bringing that media onsite ?

Marianne
Level 6
Partner    VIP    Accredited Certified

Easiest way:

Use BAR to find the filename for the client on a give day that you need to restore.

Use the 'preview media' button to list the tape(s).

My guess is that it will run the same "bpimagelist -client <client-name> -d <start-date> -e <end-date> -media" in the background, since all the tapes in the backup set will be listed.

Even a 'start restore' will list all media id's in the backup set as 'Needed for restore'.

NortonsFan
Level 4

Thanks for the support.

We are looking at automating this function of identifying a file from a tape media once its found by bpimagelist command.

Please let us know ,  is there a command excists to scan the idenified media listed from bpimagelist, to precisely find where the file we are intended to restore excists, without bringing that media onsite ?

NortonsFan
Level 4

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

command list the media for any time period for a given netbackup client

Thanks for all the contributors