I've been trying to find out eem script for config auto backup, but no luck.
So I started to write the script and finally I have the working script as below;
---
event manager applet backup
event snmp oid 1.3.6.1.2.1.2.2.1.7.151061681 get-type exact entry-op eq entry-val 1 poll-interval 3600
action 2.0 cli copy running-config ftp://id:paswwd@ftp_ip/path/to/config_file.cfg vrf <your_vrf>
or
action 2.0 cli copy running-config tftp://tftp_ip/path/to/config_file.cfg vrf <your_vrf>
---
It has been tested in Nexus 5000 version 7, and it works well for me.
Guess that it should work with any version which has the support of EEM.
Here is some explanation;
- 'event snmp oid' checks the admin status of the following mgmt vlan interface.
IF-MIB::ifAdminStatus 1.3.6.1.2.1.2.2.1.7
Mgmt VLAN Interface Index 151061681 //depends on your Nexus. needs to check with MIB Browser and to find out.
- If the ifAdminStatus is up(1), then it triggers 'action...' to run.
- poll-interval is '3600' secs (== daily backup), or 604800 == weekly backup, etc.
Hope this works for you.