Veritas-bu

[Veritas-bu] How do we expire media with duped images??

2006-08-05 14:29:04
Subject: [Veritas-bu] How do we expire media with duped images??
From: liddles at amgen.com (Liddle, Stuart)
Date: Sat, 5 Aug 2006 11:29:04 -0700
OK....try this:

A useful tip for expiring images is to look at the output from

    bpimagelist -l

 

If you look at:  <http://support.veritas.com/docs/193085>
http://support.veritas.com/docs/193085

It will give a full description of the rather messy outpuf from this
command.

Anyway, I put together an awk snippet to get just the information out that I
needed:

($1 == "IMAGE"){print $6, "Primary: "$28, "Copies: "$21,"Frags: "$22, "KB:
"$19, $7, $11, $14}

 

use it as follows:

bpimagelist -l -hoursago 999 | awk '($1 == "IMAGE"){print $6, "Primary:
"$28, "Copies: "$21,"Frags: "$22, "KB: "$19, $7, $11, $14}'

direct this to a file and then examine the output.

Now you can use this output to look for whatever you want based upon the
following:

Primary: 1 Copies: 1 -- an image that has not yet been dup'd

Primary: 1 Copies: 2 -- an image that has been dup'd, but the primary image
is still copy 1

Primary: 2 Copies: 2 -- an image that has been dup'd with the primary image
as copy 2

Primary: 2 Copies: 1 -- an image that has been dup'd, primary image is copy
2, & copy 1 has been expired there are other variations on this, but you get
the idea

 

I look for something like "Primary: 2 Copies: 2" and then use the backupid
(first field of my awk output) to expire copy 1 like this:

bpexpdate -backupid <backupid> -d 0 -copy 1 -force

The "-copy 1" part is important....if you leave this out it will expire all
of the images....probably not a good idea.

The last column in the awk output is the timestamp which may be useful if
you decide that you want to leave the copy 1 image around for a set amount
of time.  

(Remember this can be converted tohuman-readable format by using the
command:  

bpdbm -ctime <timestamp>).

 

When you expire all of the images on a tape (virtual or otherwise)

you have to follow it up with this command:

 

bpexpdate -deassignempty

This will then set the status of the tape(s) to Available.


  _____  

From: veritas-bu-bounces at mailman.eng.auburn.edu
[mailto:veritas-bu-bounces at mailman.eng.auburn.edu] On Behalf Of Veritas
Netbackup
Sent: Saturday, August 05, 2006 4:36 AM
To: veritas-bu at mailman.eng.auburn.edu
Subject: [Veritas-bu] How do we expire media with duped images??


Hi All,

We use a VTL for backups and vault the data onto tapes. We have 4 vault
policies.

We would like a set of comands or scripts which can help us 

1. get a list of images which have been duped, and expire them.

2. find media ids on VTL corresponding  to the duped images. Sort and
extract uniq ids.

3. Check each media as to whether they are unocupied and free them for
further use.

Is there a better way to do this..? Any help is appreciated.

This is required since our growth has exeeded our infra, and hence we need
to immediately release media after the images get vaulted.

Regards,
PP BIJU KRISHNAN

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://mailman.eng.auburn.edu/pipermail/veritas-bu/attachments/20060805/7ccc66cc/attachment.html

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