Veritas-bu

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

2008-05-28 16:36:49
Subject: Re: [Veritas-bu] How to List Files in an Image
From: A Darren Dunham <ddunham AT taos DOT com>
To: VERITAS-BU AT mailman.eng.auburn DOT edu
Date: Wed, 28 May 2008 20:23:32 +0000
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

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