Вы находитесь на странице: 1из 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
downloaded 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 in
this example) of the TFTP server, operation, and name of the configuration

file on the
command line interface.
<HUAWEI> tftp 10.110.24.209 put vrpcfg.zip
Transfer 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 FTP
1. Connect the router and maintenance terminal to set up a Telnet
environment. Assign
an 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
as
huawei and password as 123. The user is authorized to access "cfcard:/".
<HUAWEI> 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.
Assume
that 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)): huawei
331 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
character
of "ftp>". Enter binary following the prompt character. Then, specify the
path where
the uploaded file is to be saved on the FTP client.

ftp> binary
200 Type set to I.
ftp> lcd c:\temp
Local directory now C:\temp.
5. Transfer the configuration file.
On the PC, run the get command to download the configuration file to the
specified
path and save the file as backup.zip.
ftp> get vrpcfg.zip backup.zip
200 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 Files
You can restore the configuration files through the following ways.
NOTE
After restoring the configuration files, reset the router to make the
configuration files take effect.
Recovering the Configuration Files Saved in the CF Card Memory
This action is to restore the configuration files saved in the CF card memory
of the router as the
configuration files of the current system.
Run the following commands when the router works normally.
<HUAWEI> copy backup.zip CFcard:/vrpcfg.zip
Copy CFcard:/backup.zip to CFcard:/vrpcfg.zip?[Y/N]: y
100% complete
Info: Copied file CFcard:/backup.zip to CFcard:/vrpcfg.zip...Done
Recovering the Configuration Files Saved in the PC Through TFTP
This action is to restore the configuration files saved in the PC as the
configuration files of the
current system.
The router works as the TFFP client. The restoration procedure is similar to
that for backing up
the configuration files through TFTP. Run the tftp get command to download
the configuration

files saved in the PC to the CF card memory of the router.


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

Вам также может понравиться