标签:
一:备份配置文件
设备作为FTP服务器,用户PC作为FTP客户端
# 配置设备的FTP功能及FTP用户信息。
<HUAWEI> system-view
[HUAWEI] ftp server enable
[HUAWEI] aaa
[HUAWEI-aaa] local-user admin1234 password irreversible-cipher Helloworld@6789
[HUAWEI-aaa] local-user admin1234 privilege level 15
[HUAWEI-aaa] local-user admin1234 service-type ftp
[HUAWEI-aaa] local-user admin1234 ftp-directory cfcard:/ //这里注意是你交换机当前目录dir
[HUAWEI-aaa] quit
[HUAWEI] quit
# 保存设备当前配置。
<HUAWEI> save
# 从终端PC通过FTP连接设备,输入用户名admin1234和密码Helloworld@6789,并采用binary模式进行文件传输。
终端以Window win7操作系统为例说明。
C:\Documents and Settings\Administrator> ftp 10.136.23.5
Connected to 10.136.23.5.
220 FTP service ready.
User (10.136.23.5:(none)): admin1234
331 Password required for admin1234.
Password:
230 User logged in.
ftp> binary
200 Type set to I.
ftp>
# 备份配置文件。
ftp> get vrpcfg.zip
200 Port command okay.
150 Opening BINARY mode data connection for vrpcfg.zip.
226 Transfer complete.
ftp: 收到 1257 字节,用时 0.03秒 40.55千字节/秒。
设置恢复的配置文件为下次启动配置文件并重启设备
C:\Users\Administrator>这是备份的配置文件的默认路径
至此备份成功
二:恢复配置文件
设备作为FTP服务器,本地PC作为FTP客户端,将备份的配置文件上传到设备中
# 配置设备的FTP服务器功能及FTP用户信息。
<HUAWEI> system-view
[HUAWEI] ftp server enable
[HUAWEI] aaa
[HUAWEI-aaa] local-user admin1234 password irreversible-cipher Helloworld@6789
[HUAWEI-aaa] local-user admin1234 privilege level 15
[HUAWEI-aaa] local-user admin1234 service-type ftp
[HUAWEI-aaa] local-user admin1234 ftp-directory cfcard:/
[HUAWEI-aaa] quit
[HUAWEI] quit
# 从终端PC通过FTP连接设备,输入用户名admin1234和密码Helloworld@6789,并采用binary模式进行文件传输。
终端以Window XP操作系统为例说明。
C:\Documents and Settings\Administrator> ftp 10.136.23.5
Connected to 10.136.23.5.
220 FTP service ready.
User (10.136.23.5:(none)): admin1234
331 Password required for admin1234.
Password:
230 User logged in.
ftp> binary
200 Type set to I.
ftp>
# 上传备份的配置文件到设备中。
ftp> put vrpcfg.zip
200 Port command okay.
150 Opening BINARY mode data connection for vrpcfg.zip.
226 Transfer complete.
ftp: 发送 1257 字节,用时 0.03秒 40.55千字节/秒。
至此上传配置文件成功了
dir命令查看是否上传成功了
设置恢复的配置文件为下次启动配置文件并重启设备
<HUAWEI> startup saved-configuration config.cfg
<HUAWEI> display startup
MainBoard:
Configured startup system software: cfcard:/device_software.cc
Startup system software: cfcard:/device_software.cc
Next startup system software: cfcard:/device_software.cc
Startup saved-configuration file: cfcard:/config_old.cfg //设备当前的配置文件名。
Next startup saved-configuration file: cfcard:/config.cfg //下次启动的配置文件名。
Startup paf file: default
Next startup paf file: default
Startup license file: default
Next startup license file: default
Startup patch package: NULL
Next startup patch package: NULL
<HUAWEI> reboot //重启设备。
Info: The system is now comparing the configuration, please wait.
Warning: The configuration has been modified, and it will be saved to the next startup saved-configuration file cfcard:/config.cfg. Continue? [Y/N]:N //输入N防止设备当前的配置保存到备份的配置文件中。
Now saving the current configuration to the slot 13.
Save the configuration successfully.
Info: If want to reboot with saving diagnostic information, input ‘N‘ and then execute ‘reboot save diagnostic-information‘.
System will reboot! Continue?[Y/N]:Y //输入Y重启设备。
以上是参照华为文档,亲测
标签:
原文地址:http://www.cnblogs.com/Eric-bky/p/4540332.html