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"

3 comments:

  1. Wouldn't this be much simpler using kron?
  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.
  3. I see, looks like your exactly right. Thanks.
Add comment
Sidebar