cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3953
Views
0
Helpful
3
Replies

auto save running config

koksm
Level 1
Level 1

Is it possible to auto save the running config to a TFTP server whenever someone enters config mode?

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

You could do this with the Embedded Event Manager provided your IOS is recent enough. Something like this should work:

event manager applet save_config

event cli pattern "configure terminal" sync no skip no

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "file prompt quiet"

action 4.0 cli command "end"

action 5.0 cli command "copy running tftp://10.1.1.1/router.cfg"

action 6.0 cli command "config t"

action 7.0 cli command "no file prompt quiet"

action 8.0 cli command "end"

set 9.0 set _exit_status 1

This would require you to have a file on the TFTP server with open permissions in order for the copy to succeed. This could be a security problem.

hi,

This might do the trick. Security isn't the issue here, it is a closed test environment.

Thnx, never thought about using the event manager for this...

There is a typo here. The policy should read:

event manager applet save_config

event cli pattern "configure terminal" sync no skip no

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "file prompt quiet"

action 4.0 cli command "end"

action 5.0 cli command "copy running tftp://10.1.1.1/router.cfg"

action 6.0 cli command "config t"

action 7.0 cli command "no file prompt quiet"

action 8.0 cli command "end"

set 9.0 _exit_status 1

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: