Does anybody have a script that can be scheduled on a Legato server (Sun Unix) that can be run daily to check for clients/savesets that haven't had a full backup in X number of days?
We do full backups every 14 days and if a full is missed for any reason, that would mean that it would be another 14 days before the next full - and I don't want a rotation of 28 days.
I think this is a major shortcoming of networker. Our policy is that each machine should get a full backup every 30 days. We have over 850 clients with full backups spread out through the entire month. It is very easy to miss a failed/missed/aborted full, and reporting after the fact is not straightforward. I've written scripts to search for failed fulls and report on them each day, but my scripting is not the best and I would hesitate to share them with anyone else. In fact I am just now in the process of rewritting what I use because I found it was not completely accurate.
What is needed is the ability to implement a backup policy in networker. That way, networker would "know" that a client is supposed to have a full every 30 days and automatically report on any client which is outside the policy. Better yet, if a client goes 31 days without a full for one of it's savesets, it would be able to automatically schedule a full to achieve the desired policy.
You can get such reports with EBA - not sure with NMC, but I guess it is possible there. It possible of course using mminfo as well and that's where script comes handy if you wish to force it that way. That also assumes scripted scheduling project.
I don't have that script exactly, but do have some scripts that use mminfo on my solaris system for looking at past info.
This might help you start:
ls -1 /nsr/index | sed '/^$/d' | sort > clientlist.txt
for x in `awk '{print $1}' clientlist.txt` do eval /usr/sbin/mminfo -c $x -t '-30 days' | grep full done
-- That will look at every client you have in your index directory. There are probably better ways for you to get a list of all your clients. This just gets you a list of full savesets and dumps it to stdout.
Going further, check if any client has no full savesets, and have the script act accordingly, such as send an email or run a savegroup right then. I'd lean towards sending email warnings instead of automatically scheduling the backups. If your script is broken, or mminfo fails in some strange way you could find yourself running a full for every client.. not good!
There are still plenty of chances for this to fail you though, consider:
This just tells you that *some* filesystem on a client has a backup on some tapes. What if one filesystem failed to back up full and another didn't? Testing for that is harder.
Some files could have still failed, even though you got a full.
But something like this combined with good daily analysis of smaller failures might help. It will at least tell you if something didn't back up at all.
This reminded me... few years ago I submitted request to Legato for a new binary that would be called nsrtree (as output would be similar to DOS tree command) and would show you full-incremental/differential dependencies thus you could always figure out if your volume is not expiring because of some dependency. nsrtree by design I proposed would also be able to point out quickly which full is last too as you would have time-line option. It's such pity that RFE still didn't get implemented.
ble1
6 Operator
•
14354 Posts
•
56186 Points
206
0
Posted July 26th, 2007 07:00