I put this together quickly last Friday in perl. I'm not a perl guy so
its a bit rustic, but it will get you started. Basically, I use this
report to make sure everything has been duplicated to tape. The $nbrcpy
variable at the end tells me the number of copies (1 on disk, 2 on tape)
so it shouldn't be very difficult to write an if $nbrcpy > 1 then
bpexpdate the $image statement / loop.
This is pure windows.
-Jonathan
open(FIZZLE,"dir /B F:\DSSU |");
while (<FIZZLE>) {
@rows = split(/_/);
push (@images, "@[EMAIL PROTECTED]");
}
%seen = ();
@uniq = ();
foreach $item (@images) {
unless ($seen{$item}) {
# if we get here, we have not seen it before
$seen{$item} = 1;
push(@uniq, $item);
}
}
foreach $image (@uniq) {
open(BPIMAGELIST,"bpimagelist -L -backupid $image |");
while (<BPIMAGELIST>) {
if (/Retention Level:\s(.+\))/){$retention = $1}
elsif (/Number of Copies: *([0-9.]*)/) { $nbrcpy = $1;}
elsif (/Expiration Time:\s(.+\()/){$expiration = $1}
}
print "$image,$nbrcpy,$retention,$expiration\n";
}
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, February 15, 2007 6:50 PM
To: [email protected]
Subject: [Veritas-bu] DSSU Script
I'd like to build a script that expires dssu images the image has been
relocated to tape. What command should i use to check if the image has
been written to tape?
I'm thinking of generating the list images from a directory listing of
the dssu.
Karl
_______________________________________________
Veritas-bu maillist - [email protected]
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu