Veritas-bu

Re: [Veritas-bu] how to find on which tape is a specific unique file

2011-05-17 11:59:01
Subject: Re: [Veritas-bu] how to find on which tape is a specific unique file
From: "Patrick" <netbackup AT whelan-consulting.co DOT uk>
To: "'POUSSARD, Gilles \(APX\)'" <gilles.poussard.external AT airbus DOT com>, <veritas-bu AT mailman.eng.auburn DOT edu>
Date: Tue, 17 May 2011 16:57:15 +0100

You could try this extremely crude Perl script which will get you close. I don’t know of any way to get the exact tape. Even if you use the BAR GUI it can give you multiple tapes.

 

#!/usr/bin/perl

 

if ($#ARGV < 0 ) { print "Usage: $0 <file name>\n"; exit }

$file_name = $ARGV[0];

 

@bplist_out = `/usr/openv/netbackup/bin/bplist -Listseconds -Listpolicy $file_name`;

 

@line = split /\s+/, $bplist_out[$#bplist_out];

 

($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($line[14]);

$start_date = sprintf "%02d/%02d/%04d", $mon + 1, $mday, $year + 1900;

 

($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($line[13]);

$end_date = sprintf "%02d/%02d/%04d", $mon + 1, $mday, $year + 1900;

 

$policy_name = $line[19];

 

@bpimagelist = `/usr/openv/netbackup/bin/admincmd/bpimagelist -d $start_date -e $end_date -policy $policy_name -media`;

 

print "Media ID\n--------\n";

foreach $line (@bpimagelist) { $media_id = (split /\s+/, $line)[0]; print "$media_id\n"; }

 

exit;

 

I’m sure there will be some tweaking required.

 

Regards,

 

Patrick Whelan

VERITAS Certified NetBackup Support Engineer for UNIX.

VERITAS Certified NetBackup Support Engineer for Windows.

 

netbackup AT whelan-consulting.co DOT uk

 

 

From: veritas-bu-bounces AT mailman.eng.auburn DOT edu [mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of POUSSARD, Gilles (APX)
Sent: 17 May 2011 15:22
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] how to find on which tape is a specific unique file

 

 

 

 

Hi ,

 

I am looking by scripts ( and not with the GUI )for a way to map a specific file name saved with its  corresponding tape name.

 

For example , I want to find  on which tape is located the file  /usr/toto  

 

Thanks for your help.

 

 

Gilles.

The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.
_______________________________________________
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>