Networker

Re: [Networker] Clone Savesets

2009-09-23 18:31:39
Subject: Re: [Networker] Clone Savesets
From: Brendan Forsyth <bff AT PVHS DOT ORG>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Wed, 23 Sep 2009 16:25:36 -0600
Much appreciated.
 
Thanks!
 
 
 
Brendan Forsyth
Senior Systems Administrator
Poudre Valley Health Care
3702 Automation Way
Fort Collins CO 80525
bff AT pvhs DOT org 
(970) 495-7731 office
(970) 689-2503 cell


>>> Yaron Zabary <yaron AT aristo.tau.ac DOT il> 9/23/2009 4:20 PM >>>
Brendan Forsyth wrote:
> I am moving from cloning after each group completion to just making clones at 
> the end of the month for off-site storage.  Could someone share a query that 
> would generate a list of SSIDs for cloning the most recent full backups?

   I use the following perl script every night from cron (I deleted some 
redundant lines below):

#!/usr/bin/perl

require "timelocal.pl";

# The format of cloneq array is per mminfo's -q flag. This allows more 
flexability.

($sec,$min,$hour,$mday,$monx,$year,$wday,$yday,$isdst) = localtime(time());

$todaystart = timelocal(1,1,1,$mday,$monx,$year);

$satend = $todaystart - $wday*86400;
$satstart = $satend - 86400;

$cloneq{1} = "client=xenon.tau.ac.il";
$cloneq{2} = "client=aristo.tau.ac.il";
$cloneq{6} = "client=fas3050.tau.ac.il,name=/vol/mail,level=full";
$cloneq{7} = "client=fas3050.tau.ac.il,name=/vol/mail,level=1";
$cloneq{8} = 
"client=ex3.tau-centaur.tau.ac.il,name=MSEXCH:,savetime>$satstart,savetime<$satend";
$cloneq{9} = 
"client=ex3.tau-centaur.tau.ac.il,name=MSEXCH:IS/Academia2,savetime>$satstart,savetime<$satend";
$cloneq{10} = 
"client=ex3.tau-centaur.tau.ac.il,name=MSEXCH:IS/Minhal1,savetime>$satstart,savetime<$satend";
$cloneq{11} = 
"client=ex3.tau-centaur.tau.ac.il,name=MSEXCH:IS/Minhal2,savetime>$satstart,savetime<$satend";

unlink "/tmp/nsrclonessid";
open(SSID,">/tmp/nsrclonessid");

foreach $i (sort keys %cloneq) {

#  Find all ssid

   $nssid = 0;
   $query = "mminfo -ot -xc, -q '".$cloneq{$i}.",!incomplete,!ssrecycle' 
-r ssid |";
   #open(MMINFO,"mminfo -ot -xc, -q $cloneq{$i},!incomplete -r ssid |");
   open(MMINFO,$query);
   while ($ssid = <MMINFO>)
   {
      chop($ssid);
      $clientssid{$ssid} = 1;
      $nssid++;
   }

   close(MMINFO);

# Find ssid which were already cloned to the DataBank pool.

   $nssid = 0;
   #open(MMINFO,"mminfo -ot -xc, -q 
$cloneq{$i},!incomplete,pool=DataBank -r ssid |");
   $query = "mminfo -ot -xc, -q 
'".$cloneq{$i}.",!incomplete,!ssrecycle,pool=DataBank' -r ssid |";
   open(MMINFO,$query);
   while ($ssid = <MMINFO>)
   {
      chop($ssid);
      $clientssidc{$ssid} = 1;
      $nssid++;
   }

   close(MMINFO);

# Now see which ssid is not cloned.

   $nssid = 0;
   foreach $ssid (sort keys %clientssid) {
     if ($clientssidc{$ssid} == undef)
     {
        print SSID "$ssid\n";
        $nssid++;
     }
   }
}

close(SSID);
print "nssid = $nssid\n";
print "nsrclone -b DataBank -S -f /tmp/nsrclonessid\n";
system "nsrclone -b DataBank -S -f /tmp/nsrclonessid";


>  
> Thanks in advance.
>  
>  
>  
>  
>  
> Brendan Forsyth
> Senior Systems Administrator
> Poudre Valley Health Care
> 3702 Automation Way
> Fort Collins CO 80525
> bff AT pvhs DOT org 
> (970) 495-7731 office
> (970) 689-2503 cell
> 
> CONFIDENTIALITY NOTICE:  The information contained in this e-mail is 
> privileged and confidential, and is intended only for the use of the 
> individual or entity named above.  If you are not the intended recipient, you 
> are notified that any disclosure, copying, distribution, electronic storage 
> or use of this communication is prohibited.  If you received this 
> communication in error, please notify us immediately by e-mail, attaching the 
> original message, and delete the original message from your computer and any 
> network to which your computer is connected.
> 
> 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 


-- 

-- Yaron.

CONFIDENTIALITY NOTICE:  The information contained in this e-mail is privileged 
and confidential, and is intended only for the use of the individual or entity 
named above.  If you are not the intended recipient, you are notified that any 
disclosure, copying, distribution, electronic storage or use of this 
communication is prohibited.  If you received this communication in error, 
please notify us immediately by e-mail, attaching the original message, and 
delete the original message from your computer and any network to which your 
computer is connected.

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>