Joe Clarke Thu, 02/14/2008 - 13:18
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

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.

koksm Thu, 02/14/2008 - 23:41
User Badges:

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...

Joe Clarke Thu, 02/14/2008 - 23:57
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

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

Actions

This Discussion