Back Up and Restore Configuration Files: Document ID: 46741
Back Up and Restore Configuration Files: Document ID: 46741
Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
Make a Backup of the Configuration
Use a TFTP Server to Backup and Restore a Configuration
Use an FTP Server to Backup and Restore a Configuration
Use a Terminal Emulation Program to Backup and Restore a Configuration
Automatic Backup of Configuration using the Kron Method
Backup Configuration to a TFTP Server
Verify
Related Information
Introduction
Routers often get upgraded or swapped out for a number of reasons. This document provides the user with
some basic steps to migrate the configuration from an existing router to a new router.
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.
Components Used
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the
devices used in this document started with a cleared (default) configuration. If your network is live, make sure
that you understand the potential impact of any command.
Conventions
Refer to Cisco Technical Tips Conventions for more information on document conventions.
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:
Note: This step is to remove any security commands that can lock you out of the router.
4. Copy the configuration file from the TFTP server to a new router in privileged (enable) mode which
has a basic configuration.
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. Configure the FTP username and password.
CE_2#config terminal
CE_2(config)#ip ftp username cisco
CE_2(config)#ip ftp password cisco123
CE_2(config)#end
CE_2#
3. Copy the configuration to the FTP server.
CE_2#copy running−config ftp:
Address or name of remote host []? 10.66.64.10
Destination filename [ce_2−confg]? backup_cfg_for_router
Writing backup_cfg_for_router !
1030 bytes copied in 3.341 secs (308 bytes/sec)
CE_2#
4. 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.
5. Copy the configuration file from the FTP server to a router in privileged (enable) mode which has a
basic configuration.
1. If the configuration needs to be copied from another router, connect to that router through the console
or Telnet.
2. 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.
3. Issue the terminal length 0 command in order to force the router to return the entire response at once,
rather than one screen at a time.
This allows you to capture the configuration without extraneous −−more−− prompts generated when
the router responds one screen at a time.
4. On the HyperTerminal menu, choose Transfer > Capture Text.
Building configuration...
Note: This step is to remove any security commands that could lock you out of the router.
11. Save the file.
12. Connect to the router that needs the configuration.
13. Open the config.txt file.
14. Highlight the entire contents of the config.txt file.
You can do this by dragging the cursor from before the first character to after the last character in the
file while holding down the left mouse button. Alternatively, if you use Notepad, you can choose Edit
> Select All from the menu.
15. Copy the selected text to the Windows clipboard.
You can either choose Edit > Copy from the text editor menu, or hold down the CTRL key and
simultaneously press the C key in order to perform the copy.
16. Switch to the HyperTerminal window, and issue the configure terminal command at the Router#
prompt. Then press Enter.
17. Paste the configuration file into the router by selecting Edit > Paste to Host on the HyperTerminal
menu.
18. After the configuration has finished pasting and the router brings you back to the configuration
prompt, issue the copy running−config startup−config command in order to write the configuration
into memory.
19. Issue the exit command in order to return to the Router# prompt.
1. Create a kron policy listThis is the script that lists what commands the router should run at the
scheduled time.
Router(config−kron−policy)#cli write
Router(config−kron−policy)#exit
Verify
Use the show running−config command to confirm that the configuration file has been copied to the
destination router.
Related Information
• Technical Support & Documentation− Cisco Systems