This project saves running configuration of Dell switches to a TFTP server. Note: I tested it on Dell EMC S4048-ON switches.
- TFTP server should be configured and running.
- SSH should be enabled on the switch.
- All the switches should have same user name and password.
- Password should be encrypted and written to a text file called "keyfile.txt" under "/lib/key" location.
- After logging in, the switch should be in "Enable" mode.
Once the project is cloned to your local machine, follow the steps below.
- Edit "switch_list.txt" and provide IP of the switches that you want to backup.
- Next step is to edit "invoke_switch_config_backup.ps1" and provide TFTP server location.
- If user name to login to your switch is not "admin", you need to edit it in "invoke_switch_config_backup.ps1".
- 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".
- PS > .\invoke_switch_config_backup.ps1
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.
- Encrypting creds with PowerShell: https://www.pdq.com/blog/secure-password-with-powershell-encrypting-credentials-part-1/
- Setting up a TFTP server: http://www.tricksguide.com/how-to-setup-a-tftp-server-tftpd32-windows.html