In LAN maintenance, sometimes we need to backup and restore the configuration of network devices.
Believe that a lot of network administrator backup configuration is to use the display current command to query the present device run configuration information, and then use CTRL+C,CTRL+V to save the information to the TXT document, or directly to capture the screen output method to save information.
When restoring, copy the command to the switch to run again. This approach is of course also feasible, but when the switch is very much configured, and more complex, this approach is not appropriate.
Here's a way to import and export the H3C switch configuration as a whole.
The equipment and software used in this experiment are: H3C S5500 Series, Cisco TFTP Server
Before the experiment, we should understand the specific meaning of several nouns.
The next boot configuration saved in saved-configuration switch flash
Current-configuration switch currently in effect configuration
Factory configuration of Default-configuration switch
Startup-configuration switch Next boot configuration file
There are two ways of using a TFTP server backup configuration:
First: Backing up on the Web interface
Click Manage-> device Backup, come out the device backup interface, then enter the IP address of the TFTP server in the IP address bar, enter the name of the file you want to save in the configuration file name, then click Apply, wait for a while, the backup successful interface will appear, the following figure:
At this point there is a h3c.cfg file in the root of your TFTP software, as shown in the following figure:
The configured recovery steps are similar to backups, simply by selecting the admin-> settings Restore and then entering the appropriate IP address for the TFTP server and the name of the profile to be recovered, click Apply.
After waiting for a while, a successful recovery interface appears, as shown in the following figure:
Configurations that are recovered in this way do not need to modify the device startup items to run from the switch, that is, with a new configuration.
Second: Command line form
Configure Backup
First step: Use the Dir/all command to view the configuration file for the device.
The configuration file here is named H3c.cfg.
Step Two: Use Backup startup-configuration to 192.168.125.149 aaa.cfg or tftp 192.168.125.149 put h3c.cfg back up the configuration file ( H3c.cfg is the original configuration file name, Aaa.cfg is the file name after the backup, if you do not specify the same name as the original file.
The TFTP server also shows the success of the transmission, as follows:
Configuration Recovery
First step: Use Restore startup-configuration from 192.168.125.149 aaa.cfg or tftp 192.168.125.149 get aaa.cfg
command to download the configuration command from the TFTP server, as shown in the following figure:
Step two: Use the DIS startup command to see the configuration commands that are used for the next startup, as shown in the following figure:
Discover that we have imported the Aaa.cfg configuration file, from the switch, restore the previously configured running state.
Small knowledge: Delete Deletion of the configuration is not directly deleted, but stored in the switch Recycle Bin, using the Dir/all command can be found,
A file with square brackets is a file that is deleted with the delete command.
To actually delete the Startup.cfg file, you can use the Reset Recycle-bin command to empty the Recycle Bin, or if you are using the Delete command to take the unreserved parameter, namely: Delete/unreserved flash:/ Startup.cfg. Using the Reset save-configuration command will completely remove the startup configuration of the device save.
To make a backup in Web mode you must first turn on the HTTP service of the switch (which is enabled by default), create the username and password for the Web login (permissions must be above 3, including Level 3), and then set up a management IP for the switch. Allow the switch to communicate with the TFTP server normally.
Turn on the TFTP server, enter the management IP of the switch in the browser, this time 192.168.125.141, open the Web login interface.
Enter the username and password and enter the Web admin interface, as shown in the following figure: