cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4704
Views
5
Helpful
1
Replies

Nexus configuration auto backup to ftp/tftp

steven.lee.au
Level 1
Level 1

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.

1 Reply 1

Halyna
Level 1
Level 1

Working config: N3K-C3172TQ-10GT - username and folder. Without password. VRF - is optional.

scheduler job name backup-config
copy running-config ftp://N3K-C3172TQ-10GT@192.168.1.100/$(SWITCHNAME)-conf.$(TIMESTAMP) vrf LAN
 
end-job
scheduler schedule name backup-config
  job name backup-config
  time start 2018:06:29:16:58 repeat 7:0:0

 

Just take into account that automation backup on Nexus 3k possible only with tftp file transfer or with ftp without password.

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card