Sunday, March 8, 2015

Backup and Restore Configuration files - Cisco routers and switches

This article will show why would we backup the configuration file and how we configure the router to backup and restore the configuration files.

When would you need  backup
  • Migrate the configuration file from an existing router to a new router
  • The configuration file or part of the configuration is  accidently deleted
  • Router hardware failure
Before explaining how to backup and restore the configuration file, you should know that there are two configuration files.

running-config file is stored in the ram which contains the configuration active in the system RAM but not yet saved to NVRAM, this configuration will be lost after a power off. The RAM of the router performs the same functions of the ram of the PC.
Startup-config file is stored in the NVRAM which contains the configurations saved or copied from the running-config file, this configuration will not be lost after a power off.
This article show Backing up the running configuration file to a TFTP server, the TFTP server used in this article and video below is Solarwinds tftp server. Also, you can use another TFTP servers such as tftpd.

Backup the running-config file in the ram to a TFTP server using this command
R1#copy running-config tftp
Backup the startup-config file in the NVRAM to a TFTP server using this command
R1#copy startup-config tftp
Restoring the running config file from TFTP server to the RAM running-config file
R1#copy tftp running-config
Restoring the startup- config file from TFTP server to the NVRAM startup-config file
R1#copy tftp startup-config

The details of how to backup the configuration file from the ram to tftp server, and restore the configuration file to the router, as you show below

1- First  copy the running config file from the ram to the tftp server using the command copy run tftp, the router will ask you about the ip of the tftp server which is 192.168.1.107 in this lab.After that the router will ask you what will be the name of the config file that will be saved in the tftp server, if you press enter means you accept the suggested name r1-config.
                R1#copy run tftp
                Address or name of remote host []? 192.168.1.107
                Destination filename [r1-confg]?
                !!
                1180 bytes copied in 1.200 secs (983 bytes/sec)
                R1#
Now, the backup is done, the image below shows the syslog messages appeared on the tftp server when you make a backup.

2- we want to change the hostname, because i want to make differences between the configuration file before the restore and after the restore.  Since i will restore the backup configuration file in the next step.
                R1#conf t
                R1(config)#hostname cisco1
                cisco1(config)#exit

3- After changing the hostname to cisco1, we want to restore the backup configuration file. After restoring the previous backup configuration file, the host name of the router must be changed to R1 as it was in the backup configuration file  
                cisco1#copy tftp run
                Address or name of remote host [192.168.1.107]? 192.168.1.107
                Source filename [r1-confg]?
                Destination filename [running-config]?
                Accessing tftp://192.168.1.107/r1-confg...
                Loading r1-confg from 192.168.1.107 (via FastEthernet0/0): !
                [OK - 1180 bytes]
                1180 bytes copied in 1.732 secs (681 bytes/sec)
                R1#
A s you see above, after restoring the backup condiguration file from the tftp server, the hostname of the router is changed to R1.


The link below refer to the video that explain how to backup and restore the configuration file and how to use the TFTP server .
For more videos, subscribe the channel
https://www.youtube.com/channel/UCl25WPPKY4jnkGf32DnXU5w
To get automatic updates on your facebook, join a facebook group
www.facebook.com/groups/netsyshorizon/
To follow my articles and videos on google+
www.google.com/+tariqabosallout




1 comment:

  1. I have see the restore form the cisco switch. They method are not create the complication.I like your blog topic because i have read carefully also i'm a writer to writing the content on the online supply chain dissertation service to the user.

    ReplyDelete