Backup and Restore Configuration File

5
Backup and restore configuration file on Catalyst 2950 and router 1721 Prerequisites Requirements Before you use the information in this document, make sure that you meet these requirements: Access to a Trivial File Transfer Protocol (TFTP) or File Transfer Protocol (FTP) server. Connectivity - Routers must be able to access the FTP or TFTP server. Use the ping command to verify connectivity. Use a TFTP Server to Backup and Restore a Configuration This is a step-by-step approach to copy a configuration from a router to a TFTP server, and back to another router. Before you proceed with this method, make sure you have a TFTP server on the network to which you have IP connectivity. 1. At the Router> prompt, issue the enable command, and provide the required password when prompted. The prompt changes to Router#, which indicates that the router is now in privileged mode. 2. Copy the running configuration file to the TFTP server: CE_2#copy running-config tftp: Address or name of remote host []? 64.104.207.171 Destination filename [ce_2-confg]? backup_cfg_for_my_router !! 1030 bytes copied in 2.489 secs (395 bytes/sec) CE_2#

Transcript of Backup and Restore Configuration File

Page 1: Backup and Restore Configuration File

Backup and restore configuration file on Catalyst 2950 and router 1721

PrerequisitesRequirementsBefore you use the information in this document, make sure that you meet these requirements:

Access to a Trivial File Transfer Protocol (TFTP) or File Transfer Protocol (FTP) server. Connectivity - Routers must be able to access the FTP or TFTP server. Use

the ping command to verify connectivity.

Use a TFTP Server to Backup and Restore a ConfigurationThis is a step-by-step approach to copy a configuration from a router to a TFTP server, and back to another router. Before you proceed with this method, make sure you have a TFTP server on the network to which you have IP connectivity.

1. At the Router> prompt, issue the enable command, and provide the required password when prompted.

The prompt changes to Router#, which indicates that the router is now in privileged mode.

2. Copy the running configuration file to the TFTP server:

CE_2#copy running-config tftp:Address or name of remote host []? 64.104.207.171Destination filename [ce_2-confg]? backup_cfg_for_my_router!!1030 bytes copied in 2.489 secs (395 bytes/sec)CE_2#

3. Open the configuration file with a text editor. Search for and remove any line that starts with "AAA".

Note: This step is to remove any security commands that can lock you out of the router.

Page 2: Backup and Restore Configuration File

4. Copy the configuration file from the TFTP server to a new router in privileged (enable) mode which has a basic configuration.

Router#copy tftp: running-configAddress or name of remote host []? 64.104.207.171Source filename []? backup_cfg_for_my_routerDestination filename [running-config]?Accessing tftp://10.66.64.10/backup_cfg_for_my_router...Loading backup_cfg_for_router from 64.104.207.171 (via FastEthernet0/0): ![OK - 1030 bytes]

1030 bytes copied in 9.612 secs (107 bytes/sec)CE_2#

Page 3: Backup and Restore Configuration File

Use TFTP to Save and Restore Cisco IOS Configuration. 1- Start TFTP server.

2- Configure the TFTP server. To configure TFTP server, select menu option File | configure. Verify the following settings:

3- Save Router1 configuration to TFTP server. From HyperTerminal, begin a TFTP upload to the TFTP server: Router1#copy running-config tftp: Address or name of remote host []? (Host IP) Destination filename [router1-confg]? <ENTER> !! 1081 bytes copied in 2.008 secs (538 bytes/sec) Router1# Verify a successful upload transfer. Open Log file c:\Program Files\SolarWinds\Free Tools\TFTP-Server.txt. Contents should be similar to the following: 3/25/2007 12:29 :Receiving router1-confg from (10.250.250.254) 3/25/2007 12:29 :Received router1-confg from (10.250.250.254), 1081 bytes Verify the transferred file. Use Microsoft Word or Wordpad to examine the contents of file c:\TFTP-Root\router1-confg.

Page 4: Backup and Restore Configuration File

Part 2.7: Restore Router1 configuration from TFTP server. Download Router1 configuration file from the TFTP server: Router# copy tftp startup-config Address or name of remote host []? 10.250.250.253 Source filename []? router1-confg Destination filename [startup-config]? <ENTER> Accessing tftp://10.250.250.249/router1-confg... Loading router1-confg from 10.250.250.253 (via FastEthernet0/0): ! [OK - 1081 bytes] 1081 bytes copied in 9.364 secs (115 bytes/sec) Router1# *Mar 25 16:55:26.375: %SYS-5-CONFIG_I: Configured from tftp://10.250.250.253/router1-confg by console Router1# View the configuration in NVRAM to verify an accurate transfer. The configuration should be the same as what was configured Similar to uploading a configuration file, the IOS can also be stored off-line for future use. To discover the IOS filename, issue the Cisco IOS command show version. The filename is highlighted, below: Router1# show version Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(10b), RELEASE SOFTWARE (fc3) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2007 by Cisco Systems, Inc. Compiled Fri 19-Jan-07 15:15 by prod_rel_team ROM: System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1) Router1 uptime is 17 minutes System returned to ROM by reload at 16:47:54 UTC Sun Mar 25 2007 System image file is "flash:c1841-advipservicesk9-mz.124-10b.bin" ********************************************************* Router1# The commands to upload the IOS are similar to uploading the configuration file: Router1# copy flash tftp Source filename []? c1841-advipservicesk9-mz.124-10b.bin Address or name of remote host []? 10.250.250.253 Destination filename [c1841-advipservicesk9-mz.124-10b.bin]? !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 22063220 bytes copied in 59.564 secs (370412 bytes/sec) Router1#