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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing Clients Properties

Status
Not open for further replies.

yadnakis

MIS
Jul 19, 2005
20
EU
Hi All.

With your help i made an script to create a list of clients.

File Client.param.sql
create type:NSR client;
name:server01;
server:legatoserver;
comment:"Backup Windows 2000 Backup SQL";
schedule:BackupW2KDepartFull;
browse policy:Month;
retention policy:TwoMonths;
group:BackupW2KDepartSQL;
save set:"mssql:";
aliases:server01;
storage nodes:nsrserverhost;
Backup command:nsrsqlsv;

Script
VAR1=XXX
for i in `cat srvsql.txt`
do
VAR2=$VAR1
VAR1=$i
sed -e "s/$VAR2/$VAR1/g" client.param.sql > client.param2.sql
cp -p client.param2.sql client.param.sql
nsradmin -i client.param.sql
done


I want to know if there is a way to edit some properties of the clients, or i must recreate them

Thanks in advance

 
I guess using GUI is not in the picture? Creating and editing would be a lot easier and less of a chance of making a mistake, I like using cmd. etc. but sometime GUI is better - my opion.
 
That would be the "update" feature in nsradmin, see the man pages for more info. If you use it in a script, i.e run "nsradmin -i file", you will not need to answer "y" to update the resource.

Example:

. type:nsr group;name:Default
update autostart: Disabled

Cheers!
Maverick
 
Thanks

But if i have different clients with the same name?.. How could i do it?

 
Just use more querys, such as group or save set, to get the unique client definition. For example:

. type:nsr client;name:calvin;group:Test
update retention policy: Month

. type:nsr client;name:calvin;group:Default
update retention policy: Year

I suggest you do some experimenting with ha dummy client.

Cheers!
Maverick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top