Networker

[Networker] nsradmin and pools

2007-01-22 16:10:44
Subject: [Networker] nsradmin and pools
From: nsr admin <nsradmin AT GMAIL DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Mon, 22 Jan 2007 14:42:35 -0600
I'm trying to script adding clients to our backup server using nsradmin.
I'm having problems with the NSR pool resource.   I have a pool named Backup
that already has a group named "dummy1" in it.  I'm trying to add dummy2 to
the Backup pool, however when I run an update, it's doing a replace.    Does
anyone know how/if I can add a group to a pool without losing the existing
groups entries using nsradmin?


$cat update_pool
nsradmin -i -<<EOF
. type: NSR pool; name: Backup
show name
show groups
print
EOF

nsradmin -i -<<EOF
. type: NSR pool; name: Backup
update groups: dummy2;
EOF

nsradmin -i -<<EOF
. type: NSR pool; name: Backup
show name
show groups
print
EOF



Notice after the update, only the dummy2 group exists.

$./update_pool
Current query set
                       name: Backup;
                     groups: dummy1;
Current query set
updated resource id 0.104.113.151.0.0.0.0.0.0.0.0.69.181.15.186.10.10.96.23
(8)
Current query set
                       name: Backup;
                     groups: dummy2;
$

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>