Networker

Re: [Networker] Limit on number of savesets in an nsrclone?

2008-03-12 07:33:51
Subject: Re: [Networker] Limit on number of savesets in an nsrclone?
From: Ian G Batten <ian.batten AT UK.FUJITSU DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Wed, 12 Mar 2008 11:24:00 +0000
On 11 Mar 08, at 1958, Preston de Guise wrote:

I've seen a similar problem caused by array crashes/connectivity losses. One way to check in advance is to do the following:

I've whipped this up to industrialise it a bit. You need to replace nawk with awk if your awk supports sub(). The -a flag means it also looks for files in the disk backup that are not referenced in the catalogue.


#!/bin/ksh

tmp=/tmp/$(basename $).$$

trap "rm -f $tmp.*" 0

nsrmm |
nawk '$1=="adv_file" && $8=="enabled" {sub (",$", "", $6); print $3, $6}' > $tmp.nsrmm

while read volume path; do
  case "$path" in
    rd=*) continue ;;
  esac
  set -e
find $path -type f ! -name 'volhdr' ! -name '.nsr' -print | sed 's!.*/!!' | sort -u > $tmp.ls mminfo -q "volume=$volume.RO" -r 'ssid(60)' 2> /dev/null | sort -u > $tmp.mminfo
  join -v1 $tmp.mminfo $tmp.ls | sed "s/^/missing_file $volume /"
  if [[ $0 = '-a' ]]; then
    join -v2 $tmp.mminfo $tmp.ls | sed "s/^/surplus_file $volume /"
  fi
  set +e
done < $tmp.nsrmm

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