Dangerous Things
Custom gadgetry for the discerning hacker

The Store is now open! Check out the gadgetry »
Like what you're reading?
Share It.

Copying HP Procurve switch configs to/from switch

Once again I’m blogging something to assist my own memory. I use HP Procurve switches because I can’t afford Cisco gear, but still need decent performance. Unfortunately I just hit a snag with one of my switches where a single port has failed. As the switch is fully committed, I need to swap it out with a cold spare and get it repaired for free under the stellar lifetime warranty program HP has for their Procurve gear. A good network admin would already know how to back up his switch configs and would probably be running routine backups of those configs. I am not a good network admin, but I’m getting there.

From crav3n.com

Using the CLI commands you can copy switch configurations to and from a switch.

TFTP method

* This command copies the switch’s startup configuration (startup-config file) to a remote TFTP host.

copy <startup-config | running-config> tftp <ip-address> <remote-file>

For example, to upload the current startup configuration to a file named sw5300 in the configs directory on drive “d” in a remote host having an IP address of
copy startup-config tftp /configs/sw530

* This command copies a configuration from a remote host to the startup-config file in the switch.

copy tftp <startup-config | running-config> <ip-address> <remote-file>

For example, to download a configuration file named sw5300 in the configs directory on drive “d” in a remote host having an IP address of
copy tftp startup-config /configs/sw2512

The config file will be uploaded to the switch, which will reboot. Issue the “show run” command to verify that the switch configuration is intact.

Newer switches that have the ip ssh filetransfer feature can use the SCP/SFTP method

* copy the config to the switch using scp (or sftp):
scp myswitch.conf myswitch:/cfg/startup-config

Save eventual changes by doing write memory before logging out.

Leave a Reply

Get Adobe Flash player