Backup the configs of your Cisco routers and switches
By KrisPrem
It's always better to backup the configurations of your routers because, configuration of Routers/Switches often gets modified, a line or more is either added or deleted and sometimes router/switch itself are even upgraded or swapped out for a number of reasons and it is important to maintain the latest and history of the router's/switch's configuration files.
There are several methods to choose from in order to back up and restore a configuration:
- Use a TFTP Server to Backup and Restore a Configuration
- Use an FTP Server to Backup and Restore a Configuration
- Automatic Backup of Configuration using the Kron Method
- Backup Configuration to a TFTP Server
Automating Configuration backup
In this hubpage, we will see how to backup configuration using a Linux box.
Refer my ssh-script hubpage for automate login to Cisco routers on SSH access. For those devices that are on telnet you could create a copy of your ssh-script and make the following modifications.
Replace the spawn ssh with spawn telnet and add lines to feed your username.
spawn telnet $var1
expect "Username: "
send -- "Krisprem\r"
Now that you have the scripts for automatically login to devices that are on TELNET or SSH, all you need feed the IP address of the device from which configurations needs to be fetched. If you have hundreds of devices put all those IPs in a file and create a loop to feed the IPs one by one to your TELNET or SSH script.
- Script to login to multiple Cisco devices with Telnet & SSH using Expect
A script to login multiple devices on telnet or SSH
Comments
No comments yet.