tftp backup

Answered Question
Apr 13th, 2007
User Badges:


Hi,

Could some one please tell me :

how to take a backup of the ios image and the running config in a 2950 switch to a tftp server

Also I need to know how to restore the config and the ios file back to the switch throgh tftp


for the router I guess we need to use :


copy running-config tftp:

copy tftp: running-config


What is the command to save the ios image ?


Thanks


Raj

Correct Answer by Craig Balfour about 10 years 3 months ago

To backup the configuration of a Catalyst 2950 switch you telnet into the switch and run the following command:


copy running-config tftp://192.168.100.1/switch1-running-config


To backup the IOS and the switches web-based device manager (the web interface files) you need to do the following:


archive upload-sw tftp://192.168.100.1/switch1-ios.tar


This will create a tar archive called switch1-ios.tar of the IOS and web device manager files from your switch on your tftp server.


To restore the configuration you can either:


1) use DHCP and TFTP as described in AutoInstall Using DHCP for LAN Interfaces (http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/121t5/dt_dhcpa.htm ); or


2)you can get the basic networking up on the switch using the console and then telnet into the switch and use the following commands:


copy tftp://192.168.100.1/switch1-running-config running-config

copy running-config startup-config


To restore the IOS archive file to the switch you can:


1) get do the basic network configuration, telnet into the switch and use the following command:


archive download-sw tftp://192.168.100.1/switch1-ios.tar


This assumes that the switch has a working IOS on it already.


2) Extract IOS .bin file from the tar archive and then use the XMODEM protocol and a terminal program such as hyperterm upload the image back onto the switch using the console cable. This is what you need to do if for some reason the switch looses its IOS. See http://www.cisco.com/en/US/products/hw/switches/ps628/products_tech_note09186a0080169696.shtml

for more information on how to use XMODEM to do this.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
m.sir Fri, 04/13/2007 - 03:23
User Badges:
  • Gold, 750 points or more

You need specify where is image located ... most often is ISO image stored in switch flash

you can verify this with command

dir flash:

You get output similar like this

2950#dir flash:

Directory of flash:/


2 -rwx 2980731 Mar 01 1993 00:03:48 c2950-i6q4l2-mz.121-19.EA1c.bin

So image in this case is c2950-i6q4l2-mz.121-19.EA1c.bin


Now you can upload image to TFTP server with command

copy flash:c2950-i6q4l2-mz.121-19.EA1c.bin tftp:


M.

Hope that helps rate if it does





Correct Answer
Craig Balfour Fri, 04/13/2007 - 03:34
User Badges:
  • Bronze, 100 points or more

To backup the configuration of a Catalyst 2950 switch you telnet into the switch and run the following command:


copy running-config tftp://192.168.100.1/switch1-running-config


To backup the IOS and the switches web-based device manager (the web interface files) you need to do the following:


archive upload-sw tftp://192.168.100.1/switch1-ios.tar


This will create a tar archive called switch1-ios.tar of the IOS and web device manager files from your switch on your tftp server.


To restore the configuration you can either:


1) use DHCP and TFTP as described in AutoInstall Using DHCP for LAN Interfaces (http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/121t5/dt_dhcpa.htm ); or


2)you can get the basic networking up on the switch using the console and then telnet into the switch and use the following commands:


copy tftp://192.168.100.1/switch1-running-config running-config

copy running-config startup-config


To restore the IOS archive file to the switch you can:


1) get do the basic network configuration, telnet into the switch and use the following command:


archive download-sw tftp://192.168.100.1/switch1-ios.tar


This assumes that the switch has a working IOS on it already.


2) Extract IOS .bin file from the tar archive and then use the XMODEM protocol and a terminal program such as hyperterm upload the image back onto the switch using the console cable. This is what you need to do if for some reason the switch looses its IOS. See http://www.cisco.com/en/US/products/hw/switches/ps628/products_tech_note09186a0080169696.shtml

for more information on how to use XMODEM to do this.



rajbhatt Fri, 04/13/2007 - 04:01
User Badges:


Hi ,

Thanks a lot for ur help

and one more question.

If I want to earse the config to factory defaults for switches and routers :


Could I do wr erase currentconfig or if I do a erase nvram .

What is the effect ?

Bez with erase nvram if I am loosing the password then I have to change the flash_init

but with erase I just press mode and it work


Is there a way to reover console access without loosing the config?

as we have for pix to delete the aaa


Raj


Craig Balfour Fri, 04/13/2007 - 04:30
User Badges:
  • Bronze, 100 points or more

What I normally do to return the switch to factory default (i.e. without any configuration or VLAN database) is:


delete flash:config.text

delete flash:vlan.dat


It is possible to recover a password on a switch without loosing the configuration. Take a look at steps 7 to 11 of http://www.cisco.com/en/US/products/hw/switches/ps628/products_password_recovery09186a0080094184.shtml.

Here you basically copy the configuration (config.text) to another file, boot the switch up without any configuration, copy the configuration into running-configuration and then change the passwords before saving the configuration back to startup config. THe end result is an identical configuration just with the passwords reset to something you know.


Actions

This Discussion