Networker

Re: [Networker] Update Multiple Clients - Add To One Group

2009-05-07 09:51:22
Subject: Re: [Networker] Update Multiple Clients - Add To One Group
From: Preston de Guise <enterprise.backup AT GMAIL DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 7 May 2009 23:40:41 +1000
Hi Tom,

On 07/05/2009, at 22:36 , Tom Birkenbach wrote:

How do I easily add all my clients to one group?

I'm thinking it's an ability in nsradmin where I select clients and update the group attribute, but I can't get the coding right. I started doing this manually in the GUI, but I have over 250 clients and this probably won't be the last time I'll want to do some mass group editing. I tried in the GUI to select all my client and drag them to my new "All" group, but it didn't
work, despite this being noted as an ability in the GUI.

Assuming there's only one instance of each client, you could do:

nsradmin -s server

nsradmin> . type: NSR client
nsradmin> append group: newGroupName

the "append" option will tack it on to the end of each list of group(s) for the client.

If you have multiple client instances, it will fail on the non-first instance for each client. (I.e., if one client instance has been added to a group, other instances of the same client won't be added.)

If you save:

. type: NSR client
append group: newGroupName

to a file, then invoke:

nsradmin -s server -i file

You won't be prompted for confirmation for each client update.

Note, I don't think append came in until around 7.3, so if you're using an older server, don't try the above; and the usual caveat applies - if you're not well versed at nsradmin, it's a good idea to practice this first or have a bootstrap. Or to be more specific, nsradmin allows you to shoot yourself in the foot, so be careful and ensure you have a current bootstrap.

How do you practice this first? Easy - take a copy of the entire /nsr/ res directory - let's assume you put it in /tmp/nsr/res

You could then run:

nsradmin -d /tmp/nsr/res/nsrdb -i file

Which will run the update against the temp copy. Then run:

nsradmin -d /tmp/nsr/res/nsrdb

and do some "print type: NSR client" style checks to make sure the command worked successfully. If it did, move on to running against the actual server.

Hope this helps.

Cheers,

Preston.

--
Preston de Guise


"Enterprise Systems Backup and Recovery: A Corporate Insurance Policy":

http://www.amazon.com/Enterprise-Systems-Backup-Recovery-Corporate/dp/1420076396

http://www.enterprisesystemsbackup.com

NetWorker blog: http://nsrd.wordpress.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

<Prev in Thread] Current Thread [Next in Thread>