4
2.4 Backup and Restoration How to back up and restore data. For the router, backup and restoration involves: 2.4.1 Backing Up the Configuration File Context A configuration file can be backed up in the following manners: Procedure - Directly Copying the File Run the display current-configuration command on the command line interface and copy all command outputs into a .txt file. In this manner, the configuration file is backed up into the hard disk of the maintenance terminal. + Directly copy the configuration file to the CFcard. You can take the step to copy the current configuration file immediately to the CFcard of the router. Run the following commands to copy the configuration file to the CFcard of the router before starting the router: <HUAWEI> copy vrpcfg.zip cfcard:/backup.zip Copy cfcard:/vrpcfg.zip to cfcard:/backup.zip?[Y/N]: y 100% complete Info:Copied file cfcard:/vrpcfg.zip to cfcard:/backup.zip...Done - Backing Up the File Through TFTP 1. Assign an IP address to the router. The router functions as a TFTP client. Connect the router and maintenance terminal to set up a Telnet environment. Assign an IP address to the interface on the router. Ensure that this IP address and the IP address of the TFTP server are in the same network segment. 2. Run the TFTP server application program. Run the TFTP server application program on the PC. Configure the path where the

Backup and Restore Configuration

Embed Size (px)

Citation preview

2.4 Backup and RestorationHow to back up and restore data.For the router, backup and restoration involves:2.4.1 Backing Up the Configuration FileContextA configuration file can be backed up in the following manners:Procedure- Directly Copying the FileRun the display current-configuration command on the command line interface and copyall command outputs into a .txt file. In this manner, the configuration file is backed up intothe hard disk of the maintenance terminal.+ Directly copy the configuration file to the CFcard.You can take the step to copy the current configuration file immediately to the CFcard ofthe router. Run the following commands to copy the configuration file to the CFcard of therouter before starting the router: copy vrpcfg.zip cfcard:/backup.zipCopy cfcard:/vrpcfg.zip to cfcard:/backup.zip?[Y/N]: y100% completeInfo:Copied file cfcard:/vrpcfg.zip to cfcard:/backup.zip...Done- Backing Up the File Through TFTP1. Assign an IP address to the router.The router functions as a TFTP client.Connect the router and maintenance terminal to set up a Telnet environment. Assignan IP address to the interface on the router. Ensure that this IP address and the IPaddress of the TFTP server are in the same network segment.2. Run the TFTP server application program.Run the TFTP server application program on the PC. Configure the path where thedownloaded file is to be saved, IP address of the TFTP server, and interface number.3. Transfer the configuration file.Run the tftp command with parameters specifying the IP address (10.110.24.209 inthis example) of the TFTP server, operation, and name of the configuration file on thecommand line interface. tftp 10.110.24.209 put vrpcfg.zipTransfer file in binary mode.Now begin to copy file to remote tftp server, please wait for a while...\TFTP: 1503 bytes sent in 1 seconds.File uploaded successfully.- Backing Up the File Through FTP1. Connect the router and maintenance terminal to set up a Telnet environment. Assignan IP address to the interface on the router.2. Enable the FTP service.The router functions as an FTP server.Enable the functions of the FTP server. Create an FTP user with the username ashuawei and password as 123. The user is authorized to access "cfcard:/". system-view[HUAWEI] ftp server enable[HUAWEI] aaa[HUAWEI-aaa] local-user huawei password simple 123[HUAWEI-aaa] local-user huawei service-type ftp[HUAWEI-aaa] local-user huawei ftp-directory cfcard:/3. On the maintenance terminal, initiate an FTP connection to the router.On the PC, set up an FTP connection with the router through the FTP client. Assumethat the IP address of the router is 10.110.24.254.C:\Documents and Setting\Administrator> ftp 10.110.24.254 Connected to 10.110.24.254.220 FTP service ready.User (10.110.24.254:(none)): huawei331 Password required for huawei.Password:230 User logged in.4. Configure transfer parameters.If the FTP user passes the authentication, the FTP client displays the prompt characterof "ftp>". Enter binary following the prompt character. Then, specify the path wherethe uploaded file is to be saved on the FTP client.ftp> binary200 Type set to I.ftp> lcd c:\tempLocal directory now C:\temp.5. Transfer the configuration file.On the PC, run the get command to download the configuration file to the specifiedpath and save the file as backup.zip.ftp> get vrpcfg.zip backup.zip200 Port command okay.150 Opening ASCII mode data connection for vrpcfg.zip.226 Transfer complete.ftp: 1021 bytes received in 0.06Seconds 60.02Kbytes/sec.ftp>----End

2.4.2 Restoring the Configuration FilesYou can restore the configuration files through the following ways.NOTEAfter restoring the configuration files, reset the router to make the configuration files take effect.Recovering the Configuration Files Saved in the CF Card MemoryThis action is to restore the configuration files saved in the CF card memory of the router as theconfiguration files of the current system.Run the following commands when the router works normally. copy backup.zip CFcard:/vrpcfg.zipCopy CFcard:/backup.zip to CFcard:/vrpcfg.zip?[Y/N]: y100% completeInfo: Copied file CFcard:/backup.zip to CFcard:/vrpcfg.zip...Done

Recovering the Configuration Files Saved in the PC Through TFTPThis action is to restore the configuration files saved in the PC as the configuration files of thecurrent system.The router works as the TFFP client. The restoration procedure is similar to that for backing upthe configuration files through TFTP. Run the tftp get command to download the configurationfiles saved in the PC to the CF card memory of the router.

Recovering the Configuration Files Saved in the PC Through FTPThis action is to restore the configuration files saved in the PC as the configuration files of thecurrent system.The router acts as the FTP server. The restoration procedure is similar to that for backing up theconfiguration files through FTP. Run the ftp put command to upload the configuration filessaved in the PC to the CF card memory of the router.