Saving Configuration

Configuration commands entered from the terminal software are added to running-config. copy the contents of running-config to startup-config to save the configuration of the Cisco device. To do so, you can use the copy command, which has the following format

#copy <source-filename> <destination-filename>

<source-filename> : Source file name of the copy
<destination-filename> : Copy destination file name

To save the configuration, i.e., to copy running-config to startup-config, enter the following

Router#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
You can also use the copy command to copy files to and from a TFTP/FTP/HTTP server on the network.

To check the contents of running-config and startup-config, you can use the following commands

#show running-config
#show startup-config

Backup and Restore Configuration Files

It is not enough to save the configuration with copy running-config startup-config. It is also important to backup the configuration file separately. If you only save the configuration file, you will have to start from the beginning again when you prepare a replacement device because the device itself fails and you cannot boot. If you back up the configuration files, you can restore the backed up configuration files to the replacement unit and the configuration will be completed immediately.

The simplest way to back up your configuration files is to use show running-config , copy and paste all of its contents into a text editor and save it to your local PC as a text file with any file name.

Fig. Backup of configuration files

And the simplest way to restore a backed up configuration file is to copy and paste the contents of the configuration file into your terminal software. Remember that each line of a configuration file is a configuration command. When you copy and paste the contents of a backed up configuration file from global configuration mode, you are entering the commands all at once.

Figure Restore Configuration

However, be careful when restoring the configuration; Cisco routers have the shutdown command in the interface by default. You can enter the no shutdown command to enable the interface, but it does not appear on running-config. There is no no shutdown in the backed up configuration file either.

If you copy and paste the contents of a backed up configuration file into an interface that has a shutdown command by default, the no shutdown command is not entered and the interface remains shutdown.

Fig. Notes on restoring the configuration.

When restoring the configuration, you need to explicitly enter no shutdown in the interface’s shutdown command, or add no shutdown to the backed up configuration file.

Cisco Basic