Netmiko Automation Cisco Lab Backup

In my GNS3 lab for my TACACS Netmiko project I had several devices that I wanted to backup. This is a script I wrote a while ago that is a basic backup. The script may be found on my GitHub

There are a number of things wrong with this script which I should address. The way this is written is not particularly good, there needs to be an interaction from the user to enter passwords and there is no multi threading. These are things that have been addressed in this project.
This type of script can now be easily containerised for use in Docker. This is the type of script that can be used on a cron job.

Changes made were;

  • Removed password entered by user, comes from a .env file now
  • Added multi threading

The Script will; SSH in to each device, perform show run and save the output.

This is what the script looks like when run in my lab

Leave a Comment

Your email address will not be published. Required fields are marked *