Re: [Networker] nsradmin - Script Savegroup information for clients
2010-12-02 02:36:17
christr wrote:
I've been wanting to script daily reports on only some specific clients. They
are all members of different savegroups. I've been doing some Google searches,
but none of them have quite been giving me what I'm looking for.
So far I found this tip, which gets me close to what I'm looking for, but I
want something more specific:
nsradmin -i query.txt -s networkerserver > log.txt
Replace "networkerserver" with your NetWorker hostname.
query.txt should look something like (empty lines needed!):
8<---------------------
option hidden: on
show completion; status; work list;
print type: nsr group; name: networkergroup
----------------------
What is shown above works great, but I don't want information for all of
clients in a savegroup. I only want the information for specific clients.
Does anyone have any suggestions? I can't seem to find a way to do it, but I
suspect there must be a way. Basically, I want to save myself time each day by
not having to dig through various savegroup completion emails only to generate
a specific report.
I tried doing something like "print type: nsr client; name: [client name]", but
that didn't work.
In there name: is group name not client name. Type nsradmin and give v
(visual) now you can select types (NSR something) and browse available
fields at types. You can only print example completion field and use
grep, awk etc, because Networker rexep support is quite poor. You can
switch it on example this way "option Regexp: " in command line and try
use very basic rexep, but in this case completion is only one field.
show name
print type:NSR client;name:.*abc.* [ *abc*, \*abc\*. etc... ]
May be you should check NSR client which tell client/group information.
You insert mminfo and other commands your script, try this way check add
example bash commands. This example only remove trailing white spaces,
but i hope you catch a glue.
#!/bin/sh
(
/usr/sbin/nsradmin -s nsr_server << END
show name; save set
print type: NSR client; group: Your_Group
q
END
echo " "
) | sed -e 's/^[ ]*//g' (In there your awk, grep etc)
exit
Regards, Riku
+----------------------------------------------------------------------
|This was sent by christr AT gmail 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
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
|
|
|