Networker

[Networker] How does nsrclone order a list of SSIDs for cloning?

2009-12-29 18:24:59
Subject: [Networker] How does nsrclone order a list of SSIDs for cloning?
From: jbrissenden <networker-forum AT BACKUPCENTRAL DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 29 Dec 2009 13:02:34 -0500
What a pain huh? I believe you're right, you don't have the control over the 
ssid order when you issue nsrclone with a file. But I think if you say savetime 
< 21 days ago in your mminfo, the first run will grab everything between 21 
days and today that copies = 1 (no clone of it yet), and copy it to tape. If 
you run this daily, after the first run, the only savasets that will match will 
be todays backups. 

If what you really want is just ssids that are 21 days or older, I believe 
you'll need to use savetime > 20 days ago. Note: greater than not less than. 

However you create your ssid file, you can have better clone control by 
stepping through the file once it's sorted to your liking. 

One alternative is to use a for loop to step through the file:

for SSID in $FILE
do
nohup nsrclone -b "$POOL" -y "$RETENTION" -J "$NODE" -S $SSID&
done

There are obvious inefficiencies in this approach though. You'll need to test 
this one out. 

You could also approach this in your mminfo command. You could report on ssids 
that copies=1 and savetime >20 days ago, dump into a file, and run nsrclone on 
the file. Then do this for 19 days ago, and 18... this would limit you to 20 
nsrclone commands or so. 

If you wanted, you could decrease the number of nsrclone commands by increasing 
the granularity in the mminfo command. Run the mminfo command for copies=1 and 
savetime > 21 days ago,dump into a file, and run nsrclone on the file. Then do 
this for copies=1 and savetime > 14 days ago, copies=1 and savetime > 7 days 
ago... This would limit you to 3 or 4 nsrclone commands. 

Not the prettiest code but it should work. I am pretty sure that if you use the 
< symbol, that will match all ssid between today and 21 days ago. after the 
first run, the only ssids that will match will be today's, if run daily. All 
other savesets will have already been cloned. 


-James Brissenden

+----------------------------------------------------------------------
|This was sent by jbrissenden AT glasshouse 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