EEM script to automatically back up FTP when saving configuration

TigerDao

Administrator
Thành viên BQT
Use EEM script to automatically backup FTP when saving configuration


idea When we enter wr to save the configuration, it will automatically save the configuration to the FTP server

EEM-script-to-automatically-back-up-FTP-when-saving-configuration.png

Production:

Using EEM scripts in Cisco routers: When someone is detected entering the wr command, the command will be pushed to FTP:

Copy the running configuration ftp://u1:u1@10.1.2.1/R1.cfg

and u1/u1 is an account on the FTP server (possibly Install Zilla files)

IP 10.1.2.1 is the IP of the FTP server


Event Manager applet backup configuration

event cli mode “wr” sync yes ## To complete the wr command, run this script

Operation 1.0 cli command “enable”

Operation 1.1 cli command “conf t”

Operation 2.0 cli command “file prompt quiet” ##So that no user intervention is required when confirming the cfg file name

Action 2.1 cli command “end”

Operation 3.0 cli command “Copy running configuration ftp://u1:u1@10.1.2.1/R1.cfg”

Action 4.0 cli command “end”

###You can further improve saving by file name and date###



result:

while typing Debug event manager action cli and Writewe see the log saying that the ftp backup is normal:


1697284689_282_EEM-script-to-automatically-back-up-FTP-when-saving-configuration.png

On the FTP server:

1697284689_282_EEM-script-to-automatically-back-up-FTP-when-saving-configuration.png


Xem tiếp...
 

Thành viên mới

Thành viên trực tuyến

Không có thành viên trực tuyến.
Top