华为路由器配置文件备份与恢复 1、先把AR路由器上保存配置 [zurkj]quit <zurkj>saveall //保存配置 Warning: The current configuration will bewritten to the device. Are you sure to continue?[Y/N]:y It will take several minutes to saveconfiguration file, please wait.................. Configuration file had been savedsuccessfully Note: The configuration file will take effectafter being activated 2、对之前的保存配置进行修改 [zurkj]ippool vlan101 //创建DHCP地址池 Info:It is successful to create an IP address pool. [zurkj-ip-pool-vlan101]return //返回 <zurkj>compareconfiguration //对比配置 Info:The current configuration is not the same as the next startup configurationfile. ====== Current configuration line 71 ====== # ip pool vlan101 # aaa authentication-scheme default authentication-scheme radius authentication-mode radius ====== Configuration file line 71 ====== # aaa authentication-scheme default authentication-scheme radius authentication-mode radius authorization-scheme default 3、对当前配置文件进行保存,并保存为newconfig.cfg <zurkj>savenewconfig.cfg //保存配置文件名为:newconfig.cfg Are you sure to save the configuration tonewconfig.cfg? (y/n):y //Y确认 It will take several minutes to saveconfiguration file, please wait.............. Configuration file had been savedsuccessfully Note: The configuration file will take effectafter being activated <zurkj>dir //显示文件 Directoryof flash:/ Idx Attr Size(Byte) Date Time(LMT) FileName 0 drw- - Jan 01 1970 00:00:47 shelldir 1 -rw- 172,816 Apr 02 2017 03:41:23 webdata.db 2 drw- - Apr 01 2017 23:56:45 evm 3 drw- - Apr 01 2017 23:56:39 dhcp 4 drw- - Apr 01 2017 23:55:43 slog 5 -rw- 11,171 Apr 02 2017 00:02:26 default_ca.cer 6 -rw- 200 Apr 01 2017 23:55:11 hostkey_ECC 7 drw- - Apr 01 2017 23:55:56 logopath 8 -rw- 7,254,016 Apr 02 2017 00:00:30 V200R009C00SPC500-SPH013-WEB 9 drw- - Jan 01 1970 00:00:45 shlogfile 10 -rw- 2,446 Jul 06 2017 16:15:52 houp.huawei.com_local.cer 11 -rw- 1,289 Apr 02 2017 00:02:19 default_local.cer 12 drw- - Apr 02 2017 00:00:10 logfile 13 -rw- 1,360 Jul 06 2017 16:15:52 DigiCert_CA.cer 14 -rw- 1,912 Jul 06 2017 16:47:26 vrpcfg.zip 15 -rw- 5,272 Jul 06 2017 17:02:52 newconfig.cfg 16 drw- - Apr 01 2017 23:55:27 $_user 17 drw- - Jul 06 2017 16:15:41 sqlitedb 18 -rw- 29 Jul 06 2017 16:53:33 logrotate.status 19 -rw- 1,253 Apr 02 2017 00:01:17 local.cer 20 -rw- 480 Jul 06 2017 17:02:54 private-data.txt 21 drw- - Apr 02 2017 04:10:34 localuser 22 -rw- 1,318 Apr 02 2017 00:01:17 ca.cer 23 drw- - Jul 06 2017 16:14:43 default-sdb 24 drw- - Apr 01 2017 23:55:30 update 25 -rw- 155,945,856 Jan 01 1970 00:03:09 AR100-S-V200R009C00SPC500.cc 26 drw- - Jan 01 1970 00:09:31 libnetconf 27 -rw- 5,926 Jul 06 2017 16:15:53 mon_file.txt 28 -rw- 200 Apr 02 2017 00:02:26 ca_config.ini 29 -rw- 12,968,832 Apr 01 2017 23:59:27 AR100-S-V200R009SPH019.pat 374,744KB total available (195,988 KB free) <zurkj> 4、把AR路由器配置为ftp server,并从客户端将配置文件newconfig.cfg下载下来 [zurkj]ftpserver enable //开启FTP功能 [zurkj]aaa //进入AAA视图 [zurkj-aaa]local-userftpuser password cipher admin1234 privilege level 15 //创建本地用户ftpuser密码为admin1234 特权级别为15 [zurkj-aaa]local-userftpuser service-type ftp //配置本地用户ftpuser服务类型为FTP [zurkj-aaa]local-userftpuser ftp-directory flash: //配置本地用户ftpuser的FTP访问目录为flash:根目录 [zurkj-aaa]quit //退出 MicrosoftWindows [版本 10.0.18363.1440] (c)2019 Microsoft Corporation。保留所有权利。 C:\Users\Administrator>ftp100.100.100.100 连接到 100.100.100.100。 220FTP service ready. 530Please login with USER and PASS. 用户(100.100.100.100: (none)): ftpuser 331Password required for ftpuser. 密码: 230User logged in. ftp>binary //配置FTP传输模式为二进制 200Type set to I. ftp>lcd d:\ //配置本地目录为D盘根 目前的本地目录 D:\。 ftp>get newconfig.cfg //下载文件 200Port command okay. 150Opening BINARY mode data connection for newconfig.cfg. 226Transfer complete. ftp:收到 5272 字节,用时 0.07秒76.41千字节/秒。 此为D盘中保存下来的配置文件(newconfig.cfg) 5、重启路由器不保存刚才的配置 检查重启后的配置有无刚才创建的vlan101的DHCP地址池 6、上传配置文件并配置为设备下次启动时使用 |