How to Backup and Restore HP Procurve Switches

These steps will guide you through using SSH to access the switch, backing up the current configuration, and then also restoring a switch to a saved configuration.

A few things you will need before doing this:

Once all these are downloaded and installed, you're ready to begin.

The Powershell Way

Powershell is used to automatically backup the switches' configuration files. The config files are only backed up if there has been a change since the time the config was last backed up. In the root of the switch backup directory, there is a log file which logs which switches were backed up, and which ones were not, each time the script runs. Each switch has its own folder inside of the switch backup directory, and the config files are stored in these. The backup script logs any changes to the switch configs in a change log inside of each switches' folder.

The Posh-SSH module must be installed on the computer the script is running on: Install-Module -Name Posh-SSH.

The Compare-Files.ps1, Get-SecurePassword.ps1, and StartStop-SolarwindsTftpServer.ps1 scripts must be located in the relative path .\Other\ (inside of a folder called Other in the same directory as this backup script).

This script is part of the Cyrus Backup Solution and is called from Cyrus-Backup-Client.ps1


The Manual Way

  1. Start Solarwinds TFTP Server and make sure the TFTP firewall rule is enabled.
  2. Run PuTTY and SSH into the switch using its proper IP and port 22. You can save these connections for later with a common name that's easier to remember.
  3. Log in with administrative credentials.
  4. Use the CLI
     copy startup-config tftp <IP-ADDRESS OF TFTP> <FILENAME.cfg> 

    and hit enter. It should download to the root of your TFTP server folder.

  5. Then, move the config file to the switch backup directory (see the Google Sheets file).

(You should already have a .cfg file saved on the root of your TFTP server folder before attempting this.)

  1. SSH into the switch with Putty and log in.
  2. Use the CLI
     restore startup-configuration from <IP-ADDRESS OF TFTP> <FILENAME.cfg> 

    and hit enter.

  3. It should upload from the root of your TFTP server folder. The switch may need a reboot after this.
  • switches/procurve_backup_config.txt
  • Last modified: 2019/03/15 17:10
  • by ericclaus