配置文件可以通过以下三种方法来备份
 
1)备份display current-configuration 命令显示
2)通过FTP备份
3)通过TFTP 备份
 
1. 备份current-configuration 命令显示

    使用display current-configuration 命令可以显示路由器的所有配置(缺省配置除外)。在超级终端中,拷贝其中所有的配置显示内容到一个文本文件中,就可以备份配置文件。

    2. 通过ftp 备份

    通过ftp 备份配置文件有两种方法:

    一是路由器作为ftp server,将路由器上的配置文件下载到pc(ftp client)上。

    路由器启动后,进行如下配置:

    [h3c] local-user h3c

    [h3c-luser-h3c] password simple h3c

    [h3c-luser-h3c] service-type ftp ftp-directory flash:/ftp/h3c

    然后在已经与路由器连通的pc 上建立到路由器的ftp 连接,并备份配置文件:

    c:\]ftp x.x.x.x

    [ftp] get remotefile [localfile]

    200 port command okay.

    150 server okay , now transmit file .

    226 file transmit success.

    ftp: 735 bytes received in 0.06seconds 12.25kbytes/sec.

    其中remotefile 文件为路由器上的配置文件(config.cfg)。

    二是路由器作为ftp client,将路由器中的配置文件上传到pc(ftp server)中。

    在已经与路由器连通的pc 上启动ftp server 并配置授权信息,然后在路由器上执行如下命令:

    [h3c] ftp x.x.x.x

    [ftp] put localfile [ remotefile ]

    其中localfile 文件应为路由器上的配置文件(config.cfg)。

    3. 通过tftp 备份

    路由器作为tftp clent,将路由器上的配置文件上传到pc(tftp server)上。在路由器上执行如下命令:

    [h3c] tftp x.x.x.x put localfile [ remotefile ]

    其中localfile 文件应为路由器上的配置文件,remotefile 为上传到tftp server 后保存的配置文件名。