I'm trying to write a script that will notify me if one of my clients is storing more backup data than allowed in networker.
In my attempts to achieve this I am parsing the output of mminfo, but it seems inconsistent to say the least.
I use the following command to extract all backup clients and corresponding groups from the backup system:
mminfo -a -s SERVER -xc, -r 'client,group'
After I've generated the list of clients I run the following command on each client:
mminfo -a -s SERVER -X -V -c $client
For some reason though that does not work. It seems the first command is able to identify atleast one client (it is in the process of being removed) that the second command does not. For I get the following error:
Using the -c switch with mminfo, it will need a valid client name. I'd think you'd be better off using mminfo -q "client=$client" which will look up the media database records only without verifying if this is a valid client.
If you're looking for savesets that are too big, you might be better off querying by the size of the saveset like this:
Thank you for your help guys! Sorry for not getting back sooner.
I ended up going another route, using
mminfo -X -V -c client_name
That way I could leave the semi-confusing summarizing to Networker.
Regarding the sometimes unavailable client-names I just started listening to mminfo's exit flag and ignored it when it did'nt like the client name I supplied it.
coganb
736 Posts
364
0
Posted April 27th, 2012 00:00
Hi Azzid,
Using the -c switch with mminfo, it will need a valid client name. I'd think you'd be better off using mminfo -q "client=$client" which will look up the media database records only without verifying if this is a valid client.
If you're looking for savesets that are too big, you might be better off querying by the size of the saveset like this:
mminfo -avot -q "totalsize>10000000000" -r client,group,ssid,name,totalsize
-Bobby