Script calculates an MD hash of the running configuration and compares it to the previous MD5 hash, if the hash matches the config has not changed and no action is taken. If hash is different the script will copy the configuraton
to an FTP server.
Script will trigger based on a crontab entry of "0 0 * * *" and this equals everyday at midnight.
Requirements: Three EEM environmental variables must be created in the device CLI event manager environment ftpserver <ftp ip address> event manager environment ftpuser <username> event manager environment ftppass <ftp password>
Forth environment variable is optional. If set the script will set the OIDs in the CISCO-COPY-CONFIG-MIB to do the FTP transfer. If this variable is not set the script will use normal CLI to perform the FTP transfer. event manager environment community <snmp community>
Note that snmp community must have write permission if using SNMP. snmp-server community <snmp community> rw
Script can also be executed manually on the CLI exec mode: