Your browser failed to load CSS style sheets. Your browser or web proxy might not support elliptic-curve TLS

Building network automation solutions

9 module online course

Start now!
back to overview

Copy file to an FTP server with EEM applet

cpmf14 has left an interesting comment documenting how to perform a periodic back up of a file in router's flash to an FTP server:
event manager applet backup-crl
 event timer watchdog time 86400 maxrun 4294967295
 action 1.0 cli command "enable"
 action 2.0 cli command "copy flash:/iosca.crl ftp://username:[email protected]/" pattern "a.b.c.d"
 action 3.0 cli command "a.b.c.d" pattern "iosca.crl"
 action 4.0 cli command "iosca.crl"
 action 5.0 syslog msg "FTP backup successful"

Please read our Blog Commenting Policy before writing a comment.

3 comments:

  1. Wouldn't this be much simpler using kron?

    ReplyDelete
  2. As far as I'm aware, kron does not support commands that require extra input (that is supplied with the "pattern" keywords in the EEM applet). If you want to implement the same functionality with kron, you have to disable file prompting.

    ReplyDelete
  3. I see, looks like your exactly right. Thanks.

    ReplyDelete

Constructive courteous comments are most welcome. Anonymous trolling will be removed with prejudice.

Sidebar