cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10547
Views
0
Helpful
3
Replies

auto config backup weekly or monthly

Adnan Khan
Level 4
Level 4

Hi,

 

I have above 100 devices and I would like to automate switch config backup to my tftp server. Can anyone assist please.

1 Accepted Solution

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

you have 2 Options.

 

1. You can run EEM Script inside the device and push the config to TFTP Server.

2. you can have simple Linux script can get in each device and push the config to TFTP Server.

 

or simple tool Solarwinds Cattools does everything for you auto back all devices.

https://documentation.solarwinds.com/en/Success_Center/KCT/Content/KCT_AG_CatTools_Overview.htm

 

EEM Script example :

 

Supposed you need to back up your router configuration at a specific time every day, you can do this automatically using EEM.

If you are good with Linux you understand Cron command.

event manager environment filename 2900-1-confg

event manager environment tftploc tftp://192.168.1.101/

event manager applet backupcfg

event timer cron name job1 cron-entry “34 2 * * 0-6

action 1.0 cli command “enable”

action 2.0 cli command “conf t”

action 3.0 cli command “file prompt quiet”

action 4.0 cli command “end”

action 5.0 cli command “copy start $tftploc$filename”

action 6.0 cli command “conf t”

action 7.0 cli command “no file prompt quiet”

 

 

Linus script for backup using pythpn.

 

http://www.techspacekh.com/automate-backup-cisco-router-switch-configuration-with-python-script/

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

3 Replies 3

balaji.bandi
Hall of Fame
Hall of Fame

you have 2 Options.

 

1. You can run EEM Script inside the device and push the config to TFTP Server.

2. you can have simple Linux script can get in each device and push the config to TFTP Server.

 

or simple tool Solarwinds Cattools does everything for you auto back all devices.

https://documentation.solarwinds.com/en/Success_Center/KCT/Content/KCT_AG_CatTools_Overview.htm

 

EEM Script example :

 

Supposed you need to back up your router configuration at a specific time every day, you can do this automatically using EEM.

If you are good with Linux you understand Cron command.

event manager environment filename 2900-1-confg

event manager environment tftploc tftp://192.168.1.101/

event manager applet backupcfg

event timer cron name job1 cron-entry “34 2 * * 0-6

action 1.0 cli command “enable”

action 2.0 cli command “conf t”

action 3.0 cli command “file prompt quiet”

action 4.0 cli command “end”

action 5.0 cli command “copy start $tftploc$filename”

action 6.0 cli command “conf t”

action 7.0 cli command “no file prompt quiet”

 

 

Linus script for backup using pythpn.

 

http://www.techspacekh.com/automate-backup-cisco-router-switch-configuration-with-python-script/

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Many thanks Balaji

StevePetryschuk
Level 1
Level 1

Any specific reason you've chosen to back up to your own tftp server? As @balaji.bandi mentioned above, there's a few commercial and open source solutions that have solved this problem already. It comes down to a bit of time vs. money / build vs. buy decision.

 

Not sure if this was part of your home built backup implementation, but a number of the existing solutions also allow you version control the backups so you can see historical configs. If you chose to go down the 'buy' path, here's a good place to start- https://www.g2.com/categories/network-management

Network Management @ Auvik - https://auvik.com/try
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: