cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting with Clish on Netbackup 5220

donypie
Level 4

We have to modify /etc/hosts for each new client on 8 "5220" appliances. Lot of time with CLISH ... It is possible to script it by using CLISH or SSH ?

Thanks.

9 REPLIES 9

Mark_Solutions
Level 6
Partner Accredited Certified

Just drop into the O/S via the CLISH (Support - Maintenance - P@ssw0rd - elevate)

and then vi the hosts file  - you can copy and paste if logged in via Putty

Hope this helps

donypie
Level 4

Thanks for your answer but I would like to modify a central /etc/hosts and then push it via scripting on our 8 "5220" appliances. Loging on each 5220 takes too much time and is not very productive ...

Thanks.

 

 

 

Mark_Solutions
Level 6
Partner Accredited Certified

I have used pcsp to push files to an appliance but only to open share areas (logs / software) etc.

You would need to test if it worked to the /etc location but it is just SUSE linux so you should be able to

donypie
Level 4

Thanks, I will test it and post an reply next week.

 

Pierre.

donypie
Level 4

We tested it and it does not work :

scp test.txt admin@xxxxxxxxxx:/tmp
Password:
lost connection

 

We received a lost connection error. Any idea ?

Thanks.

EnriquePereira
Level 5
Partner Accredited

Netbackup appliances are high secured with symantec system critical protection. You can not scp files into them.

If you have to put the same hosts file on 8 appliances maybe you can script a restore of a master hosts file redirecting them to each appliance?

bp_kill_all
Level 3
Partner Accredited

I suggest you look into something like puppet/chef (maybe something simple like fabric even) or any other configuration management tool and have it pull the hosts file from a central repository.

Try avoiding making too much changes in the OS since it is after all an appliance.

Dave_ts
Level 3
Employee

You mention you need to modify the appliance /etc/host regualrly. I was wondering why, changes to the OS should be avoided where possible. The appliance will first check the /etc/hosts for mapping host names to IP but then it will use dns, see /etc/nsswitch.conf.

 

 

jnardello
Moderator
Moderator
   VIP    Certified

1) Create a service account on the appliance.

2) scp the updated hosts file to the service account.

3) setup an admin account cron job of some kind that checks for the presence of the updated file and if detected, overwrites the existing appliance hosts file.

 

While you could start hacking things so you could directly scp to the admin account, aside from breaking the security features I'm sure those kinds of changes would get overwritten again the next time you updated the appliance software.

 

As for why you'd be making hosts file changes, all the regular reasons you'd do it on any server : because one or more hosts wasn't in DNS (assuming your environment has DNS at all).