Net Assured

Net Assured

Network and Security Consultancy

T 07789 400408
Email: info@netassured.co.uk

Net Assured Limited
84 Goodacre, Orton Goldhay, Peterborough, PE2 5LZ

  • Home
  • Services
  • Blog
  • About
  • Contact
FREEQUOTE

Cisco SG300 backup python script

Friday, 16 February 2018 / Published in Automation, Networking

Cisco SG300 backup python script

New script published to GitHub, a Cisco SG300 backup python script used to backup my SG300’s in my home lab.

The script uses Netmiko to handle the ssh connection. The configuration from each switch is saved to a TFTP server in my home lab.

I’ll shortly be adding an alternative version of the script which will save the config to a file as part of the ssh session.

Please note TFTP is NOT encrypted so care should be taken in assessing the risks of using TFTP to backup your switches. I use the TFTP option in my home lab as my switches reside on a dedicated vlan used for management. A Synology NAS provides the TFTP server and the configs are synced to a cloud drive using the Synology Cloud Sync application.

Prior to writing this Python script a combination of bash and expect scripts handled the ssh connection to the switches. Netmiko is cool project authored by Kirk Byers, a Multi-vendor library to simplify Paramiko SSH connections to network devices. Netmiko has enabled me to consolidate down to a single script.

Please note that the Cisco SG300 requires ‘ip ssh password-auth’ configured prior to using Netmiko.

Error checking and verification will be added to the script over time.

The Script can be found on GitHub here.

Categories

  • Automation
  • Networking
  • Security
  • Starlink
  • Ubiquiti UniFi

NEWSLETTER SIGNUP

By subscribing to our mailing list you will always be updated with the latest news from us.

We never spam!

Menu

  • Home
  • Services
  • Blog
  • About
  • Contact
  • Privacy Policy
  • Cookie Policy

Get In Touch

T 07789 400408
Email: info@netassured.co.uk
NET ASSURED LIMITED
84 Goodacre | Orton Goldhay
Peterborough | PE2 5LZ
Company Registration: 9480811
VAT Registration: 207 5161 32
  • GET SOCIAL

© 2015 - 2026 Copyright by Net Assured Limited | All rights reserved

TOP
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behaviour or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}