Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nsadmin scripting

Status
Not open for further replies.

stigger

MIS
May 18, 2002
25
AU
I'm obviously missing something here...

I have a script to change the backup command

#!/bin/bash
nsradmin -i - <<EOF
. type: NSR client; name: maitprodsql1; group:SQLLogs; save set:
"MSSQL$TESTSQL2005:DR_TEST_DB_Test1"
update backup command: "nsrsqlsv"
EOF

which gives me this output

[root@maitop2 /]# 30mins.sh
Current query set
no resources to update!

And doesn't make the change...

If I run the lines manually

I get this

[root@maitop2 /]# nsradmin
NetWorker administration program.
Use the "help" command for help, "visual" for full-screen mode.
nsradmin> . type: NSR client; name: maitprodsql1; group:SQLLogs; save
set: "MSSQL$TESTSQL2005:DR_TEST_DB_Test1"
Current query set
nsradmin> update backup command: "nsrsqlsv"
backup command: nsrsqlsv;
Update? y
updated resource id 1.90.7.11.0.0.0.0.0.0.0.0.74.204.18.70.10.150.8.164(258)
nsradmin>

From what I can see nsradmin requires a confirmation which I cannot
provide in the script, is this a show stopper of have I missed
something...

Regards

Jeff
 
I got the answer from else where I didn't escape the $ my bad...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top