Net Assured

Net Assured

Network and Security Consultancy

T 07789 400408
Email: nick.moody@netassured.co.uk

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

  • Consultancy
  • Blog
    • Automation
    • Certificates
    • Certifications
    • Lab
    • Security
    • Networking
    • The Bookshelf
    • Personal
  • About
  • Contact

Cisco SG300 backup python script

Friday, 16 February 2018 / Published in Automation, Lab, 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.

Recent Posts

  • GNS3 VM on ESXi 802.1q link to external network

    This post details my experiences getting the GN...
  • Restore VMware ESXi Host Configuration

    This is a follow up post to the last one about ...
Tweets by nickpmoody
Follow @nickpmoody

Categories

  • Automation
  • Certificates
  • Certifications
  • Lab
  • Networking
  • Personal
  • Security
  • The Bookshelf

Menu

  • Consultancy
  • Blog
  • About
  • Contact

Get In Touch

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

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

TOP