Veritas-bu

Re: [Veritas-bu] How to List Files in an Image

2008-05-28 17:12:13
Subject: Re: [Veritas-bu] How to List Files in an Image
From: "Jeff Lightner" <jlightner AT water DOT com>
To: "A Darren Dunham" <ddunham AT taos DOT com>, <VERITAS-BU AT mailman.eng.auburn DOT edu>
Date: Wed, 28 May 2008 16:54:19 -0400
To see which media / backup IDs etc... were used for a given policy:

bpimmedia -L -policy <policyname>  -d MM/DD/CCYY HH:MM:SS -e MM/DD/CCYY
HH:MM:SS

where -d = start time and -e = end time of the backup you're interested
in

Example: The backup IDs only pipe it to "grep <hostname>_" as this is
contained as part of the backup ID:
   bpimmedia -L -policy ATUBKS01-ERPDB-DMXBCV  -d 07/14/2007 01:56:00 -e
07/15/2007 01:00:00 |grep atubks01_
example output:
  atubks01_1184403590  ATUBKS01-E FULL  4   161    N  N  R  1   04:59
08/15/2007
  atubks01_1184403587  ATUBKS01-E FULL  4   91     N  N  R  1   04:59
08/15/2007
  atubks01_1184403584  ATUBKS01-E FULL  4   96     N  N  R  1   04:59
08/15/2007

Or use bpimagelist:
bpimagelist -L -policy ATUBKS01-ERPDB-DMXBCV  -d 07/14/2007 01:56:00 -e
        07/15/2007 01:00:00 |grep atubks01_
example output:
  Backup ID:         atubks01_1184403590
  Backup ID:         atubks01_1184403587

You can then use the above backup IDs with bpflist.

bpflist -backupid atubks01_1184403590 -d 07/14/2007 01:56:00 -e
07/15/2007 01:00:00 -rl 999
NOTE:  If client/media server is not the master then add "-client
<clientname>".

-rl = recursion level - less than 999 would work for most things (e.g.
/datbase/proddata01/file.dbf is only 3 levels deep so -rl 3 would
restore
that file.)

-----Original Message-----
From: veritas-bu-bounces AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of A Darren
Dunham
Sent: Wednesday, May 28, 2008 4:24 PM
To: VERITAS-BU AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] How to List Files in an Image

On Wed, May 28, 2008 at 03:32:49PM -0400, Dennis Peacock wrote:
> 
> So...you mean to tell me that there is NOT an easy way to get a file
listing from a single backup image?

It depends.  

> Say I ran policy: redbaron-archive
> This backup ran last night.
> I now need to get the following information for audit purposes:
> 
> 1. Directory path and file name
> 2. File Size
> 3. VolSer(s) used for the backup 

So if you can identify the image from parameters (client, date, policy,
etc...)  rather than backup image, then 1 and 2 are pretty simple:

# bplist -R -l -C bkpsrv -s 05/27/2008 -unix_files /etc 
drwxr-xr-x root      root                0 May 26 04:02 /etc/
drwxrwxr-x root      sys                 0 Jan 21 15:50 /etc/cups/
drwx--x--x root      sys                 0 May 27 18:14 /etc/cups/certs/
-r--r----- root      sys                32 May 27 18:14
/etc/cups/certs/0

(This machine is pretty static, so only those files were backed up
during last night's incremental).  

Tape used is more difficult.  You could get all tapes used in the image
with bpimagelist.  But I don't know of a way to use 'bplist' to narrow
it down.

Otherwise you can identify the image with parameters as above, or
explicitly with the image id, then use 'bpflist' to find the specific
files.  The image above is bkpsrv_1211937380 so...

# bpflist -client bkpsrv -d 01/01/2001 -rl 999 -backupid
bkpsrv_1211937380 | grep /etc
6055 0 5 50 9055506 1 0 0 26625 /etc/ 16877 root root 0 1211850296
1211799749 1211799749
6056 0 10 49 9055509 1 0 0 26625 /etc/cups/ 16893 root sys 0 1211850296
1200959407 1211713332
6057 0 16 49 9055510 1 0 0 26625 /etc/cups/certs/ 16841 root sys 0
1211850296 1211937245 1211937245
6058 0 17 50 9055511 1 0 0 26625 /etc/cups/certs/0 33056 root sys 32
1211937245 1211937245 1211937245

Now this data is harder to read directly, but there's more information,
and the fields are defined here:
http://seer.support.veritas.com/docs/271392.htm

With that, you can get the pathname (field 10), size information (field
14), and the offset into the image (field 5).

Given the offset, you can use 'bpimagelist' to see which fragments are
on which volumes.  That gives you the location of the file directly.

No, I don't know a command that comes with NBU that will give you all
that information instantly.  But scripting it up is very possible.

-- 
Darren
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential 
information and is for the sole use of the intended recipient(s). If you are 
not the intended recipient, any disclosure, copying, distribution, or use of 
the contents of this information is prohibited and may be unlawful. If you have 
received this electronic transmission in error, please reply immediately to the 
sender that you have received the message in error, and delete it. Thank you.
----------------------------------

_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

<Prev in Thread] Current Thread [Next in Thread>