From the course: Network Automation Quick Start

Unlock this course with a free trial

Join today to access over 22,700 courses taught by industry experts.

Backup switch configurations

Backup switch configurations

- [Instructor] So let's iterate our script and get it to do something else. Here's a new version of the script and I've made some changes. We don't need this, so I've removed that from the script. This says enter your remote account. I've changed that back to enter your telnet username, because that makes more sense. This is the same as before. We asking the user for a password and we opening up a file called myswitches. For each IP address in the file, we gonna strip any spaces and then we going to print Get running config from Switch. So I've made a slight change here. Rather than making changes to the VLAN database of the switches, I'm going to use the command terminal length 0 and show run to show the running configuration of the switches. So I've added a print statement here so that we know that the script is getting the running configuration from a switch with this IP address. So rather than saying configuring switch, it's now gonna say Getting running config from the Switch…

Contents