Network Change & Configuration Management

Reply

Netmri input hostname in backup script automatically in cisco device

Arnaud
Techie
Posts: 1
2281     0

Hi guy,

I try to deploy a backup script from netmri to all my switches/router and I have a problem to implement the name of a backup file.

In fact, I want to put the hostname automatically for each devices but I don't find the way to implement this variable... I have try with sciprts-variables but I need do a global deployement and not one by one.

 

This the script that I want implement :

 

Script-Filter:
 true

Script-Variables:
 $Commands_to_be_Executed text  "Enter commands here, one per line"

########################################################################
Action:
 Execute Command Batch

Action-Description:
 vérification du kron de backup

Action-Commands:
 conf t
 kron occurrence backupConfig at 09:50 recurring
 policy-list backupConfig
 exit
 kron policy-list backupConfig
 cli show startup-config | redirect tftp://192.168.1.11/$hostname-config.txt
 end
 wr

 

 

thanks, for your help

Re: Netmri input hostname in backup script automatically in cisco device

Adviser
Posts: 406
2282     0

Sorry buddy, you posted this over the holidays so we missed it Smiley Wink  Next time just give it a bump

 

Change the following to

 

 cli show startup-config | redirect tftp://192.168.1.11/$name-config.txt

 

Also what version of NetMRI are you running.

 

You should also remove 

Script-Variables:
 $Commands_to_be_Executed text  "Enter commands here, one per line"

 

Looks like you are not using it so no need for it Smiley Happy

 

Sif

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh
Showing results for 
Search instead for 
Do you mean 

Recommended for You