Re: [Networker] nsradmin and pools
2007-01-22 17:22:49
You have to put all the groups in there that you want to exist after the
update. You can get the current atributes with a print. Use text parsing
(use your favorite utility) to extract the portion you need. Combine it with
the new stuff in a variable and then update.
-----Original Message-----
From: nsr admin [mailto:nsradmin AT GMAIL DOT COM]
Sent: Monday, January 22, 2007 2:43 PM
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Subject: nsradmin and pools
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
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
|
|
|