GithubHelp home page GithubHelp logo

dell_switch_backup's Introduction

Overview

This project saves running configuration of Dell switches to a TFTP server. Note: I tested it on Dell EMC S4048-ON switches.

Prerequisites

  1. TFTP server should be configured and running.
  2. SSH should be enabled on the switch.
  3. PowerShell module Posh-SSH should be installed on the node from which the script is running.
  4. All the switches should have same user name and password.
  5. Password should be encrypted and written to a text file called "keyfile.txt" under "/lib/key" location.
  6. After logging in, the switch should be in "Enable" mode.

How to use?

Once the project is cloned to your local machine, follow the steps below.

  1. Edit "switch_list.txt" and provide IP of the switches that you want to backup.
  2. Next step is to edit "invoke_switch_config_backup.ps1" and provide TFTP server location.
  3. If user name to login to your switch is not "admin", you need to edit it in "invoke_switch_config_backup.ps1".
  4. Encrypt the password and save it in "keyfile.txt" under "/lib/key" location. Example: "Pass1234" | ConvertTo-SecureString -AsPlainText -Force | ConvertFrom-SecureString | Out-File "C:\keyfile.txt" . Here "Pass1234" will be encrypted and stored in "C:\keyfile.txt". Copy this "keyfile.txt" and replace it with key file under "/lib/key".
  5. PS > .\invoke_switch_config_backup.ps1

Use case

You can schedule this PS script using a task scheduler, so that the running configuration of switches can be backed up automatically on a daily basis or as per requirements.

References

  1. Encrypting creds with PowerShell: https://www.pdq.com/blog/secure-password-with-powershell-encrypting-credentials-part-1/
  2. Setting up a TFTP server: http://www.tricksguide.com/how-to-setup-a-tftp-server-tftpd32-windows.html

dell_switch_backup's People

Contributors

vineethac avatar

Stargazers

Ethan B avatar Arjun Nair avatar

Watchers

James Cloos avatar

Forkers

arjunnairp

dell_switch_backup's Issues

When the switch is not in ENABLE Mode ?

Hello,

nice Code, perfect solution to backup our configs periodically on TFTP Server.
unfortunately our switches are not in ENABLE mode, i had to enter EN and the Secure PW again before i can run COPY
I've played around with the code but never get it working like this...

-SSHCOMMAND "enable"
-SSHCOMMAND "$password"
-SSHCOMMAND "copy...."

is there any chance to include this in your CODE?

THX and Kind regards,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.