Networker

[Networker] Things to do with Perl scripts in NW

2010-05-24 04:39:33
Subject: [Networker] Things to do with Perl scripts in NW
From: rovinabi <networker-forum AT BACKUPCENTRAL DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Mon, 24 May 2010 04:37:00 -0400
Hi Martin,
       Here is a simple perl script that uses mminfo to query that days 
savesets and then clone them.

#!/usr/bin/perl -w

#Collect the ssid's that have to be staged.
open MMINFO,"\"C:\\Program Files\\Legato\\nsr\\bin\\mminfo.exe\" -avot -t today 
-r ssid,volume |"  || die "Failed $!";
my $header =<MMINFO>; # omiting the First Row that is the header.
# Processing each row.
while(<MMINFO>)
{
        ($ssid,$volume) = split (/ /); # assigning the output to variables.
        next if $volume =~ /.RO$/; # Ignoring the savesets in the .RO device.
        system ("\"C:\\Program Files\\Legato\\nsr\\bin\\nsrclone.exe\" -b 
\"Default Clone\" -S $ssid "); # Command to closne the savesets to the clone 
pool Default Clone.
}
close(MMINFO);

Hope this helped,
Rovin D'Souza.

+----------------------------------------------------------------------
|This was sent by rovinabishek.dsouza AT mphasis DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

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