Networker

Re: [Networker] Index retention and Browse times

2006-07-10 13:22:03
Subject: Re: [Networker] Index retention and Browse times
From: Daniel Rich <drich AT PDI DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Mon, 10 Jul 2006 10:21:16 -0700
Sid Martin wrote:
> nsrmm -S 3124566209 -w 03/20/2007 -e 03/20/2012
> nsrmm: Cannot extend the browse time of a recoverable save set 3124566209
>  
> after this attempt 
>  
> nsrmm -S 3124566209 -e 03/20/2012 
>  
> worked but I seem to be unable to change the browse time.....
>
> What is the best way to obtain a list of SSIS's for a particular pool so I 
> can create a script to extend the retentions....
>
> I have to change browse and retention on all tapes and restore from a 
> selected few now.... 
>   

Here is a script that I used to run on my index tapes to reset the
browse and recycle times.  There was a bug in 7.2 (and 7.1 I think)
where setting them on the savegrp command line didn't always work, so I
ran the following after my daily disaster recovery index backups.  This
script sets the expiration time to 14 days, but you can make it any
number of days in the future by changing the "14" in the line "$time +=
(14 * 24 * 60 * 60)".  This is written for my pool "LTO Index", so
you'll want to change that to your pool name.

    #!/usr/bin/perl
    # $Id$
    #

    use strict;
    use Time::Local;
    use POSIX qw(strftime);

    # Get dates
    my %dates;
    open(MMINFO,"mminfo -q pool='LTO Index'|") or die "cannot start mminfo for 
pool LTO Index: $!";
    while(<MMINFO>) {
      chomp;
      s/^\s+//;                     # Strip leading whitespace
      my($vol,$client,$date,$junk) = split(/\s+/,$_,4);
      next if ($date eq "date");
      $dates{$date}++;              # Track ss dates
    }
    close(MMINFO);

    foreach my $date (sort keys %dates) {
      open(MMINFO,"mminfo -q 'pool=LTO Index,ssrecycle=false,sscreate>=$date 
00:00:00,sscreate<=$date 23:59:59' -r ssid|") or die "mminfo: $!";
      my($mon,$mday,$year) = split(/\//,$date);
      $year += 2000;
      # Get new time, date + 14 days
      # (use noon to avoid daylight savings time problems)
      my $time = timelocal(0,0,12,$mday,($mon-1),($year-1900));
      $time += (14 * 24 * 60 * 60);
      my $newdate = strftime("%m/%d/%y",localtime($time));
      while(<MMINFO>) {
        chomp;
        #`nsrmm -e $newdate -w $newdate -S $_`;
        `nsrmm -e $newdate -w $newdate -S $_`;
      }
    }
      


-- 
Dan Rich <drich AT pdi DOT com>
          PDI Dreamworks |  "Step up to red alert!"  "Are you sure, sir?
           (650)562-9018 |   It means changing the bulb in the sign..."


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
wit 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