02-14-2008 04:41 AM
Is it possible to auto save the running config to a TFTP server whenever someone enters config mode?
02-14-2008 01:18 PM
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.
02-14-2008 11:41 PM
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...
02-14-2008 11:57 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide