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

How to take backup of configurations of routers/switches by automated script

Hi Frnds,

 

Can any one suggest me a script to take the backup of the network devices(routers/switches) .Like running-configuration with one go for all the devices.

 

Thanks ,

Mohammad.

1 Accepted Solution

Accepted Solutions

Mark Malone
VIP Alumni
VIP Alumni

Couple of ways you could do this but it needs to be enabled on each device if you don't have something like LMS/Prime to grab all devices configs centrally

Archive command and tftp config to a device on your network

http://www.cisco.com/c/en/us/td/docs/ios/fundamentals/command/reference/cf_book/cf_a1.html#wp1018716

or use a kroon job , schedule it and send it off to a device for storage

http://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-122-mainline/46741-backup-config.html#ab

just some options there is probably more ways as well

 

edit

you could use EEM aswell

View solution in original post

3 Replies 3

Mark Malone
VIP Alumni
VIP Alumni

Couple of ways you could do this but it needs to be enabled on each device if you don't have something like LMS/Prime to grab all devices configs centrally

Archive command and tftp config to a device on your network

http://www.cisco.com/c/en/us/td/docs/ios/fundamentals/command/reference/cf_book/cf_a1.html#wp1018716

or use a kroon job , schedule it and send it off to a device for storage

http://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-122-mainline/46741-backup-config.html#ab

just some options there is probably more ways as well

 

edit

you could use EEM aswell

Hi Mark,

Apart from the above Kroon , do we have any script which we can take backup by just running a batch file and which can be customized according to our need.

 

Thanks & Regards,

Shaik Mohammad. 

S11000252
Level 1
Level 1

yes, we can do. with as below steps.

01:-Create one Folder in D Drive Like D:\Backup\
02:-paste putty software inside D:\backup\
03:-Create Command File inside backup folder [D:\Backup\command-192.168.1.1.txt]
03:-Create Command File inside backup folder [D:\Backup\command-192.168.1.2.txt]
03:-Create Command File inside backup folder [D:\Backup\command-192.168.1.3.txt]
  
04:-Enter Command [copy runn | redirect tftp://Backup_192.168.1.1.cfg] inside D:\Backup\command-192.168.1.1.txt
04:-Enter Command [copy runn | redirect tftp://Backup_192.168.1.2.cfg] inside D:\Backup\command-192.168.1.3.txt
04:-Enter Command [copy runn | redirect tftp://Backup_192.168.1.3.cfg] inside D:\Backup\command-192.168.1.3.txt
  
05:-Create bat file D:\Backup\backup.bat and enter as below command inside bat file
  
 write below command in bat file and save
6:-putty.exe -ssh 172.25.175.1 -l USER-NAME -pw ENTER-USER-PASSWORD -m D:\Backup\command-192.168.1.1.txt
6:-putty.exe -ssh 172.25.175.1 -l USER-NAME -pw ENTER-USER-PASSWORD -m D:\Backup\command-192.168.1.2.txt
6:-putty.exe -ssh 172.25.175.1 -l USER-NAME -pw ENTER-USER-PASSWORD -m D:\Backup\command-192.168.1.2.txt
  
7:-Run TFTP software and set the path of backup folder
8:-open command prompt and run D:\Backup>Backup.bat and it will save running config to tftp 
  
 But now a dayes. We should use automation tools linke Ansible.
Review Cisco Networking for a $25 gift card