1、配置文件备份
支持SCP, FTP和SFTP协议。可以通过configupload命令将博科交换机的配置以文本格式存到本地。
本次使用的是FTP服务器。ftp服务器使用的FileZilla_Server软件。建议先安装这个软件,然后进行简单的配置。
备份配置文件:
Brocade_5300:admin> configupload
Protocol (scp, ftp, sftp, local) [ftp]: ftp
Server Name or IP Address [host]: 10.77.77.79 【光纤交换机默认管理IP是10.77.77.77。我笔记本配置IP是79】
User Name [user]: test【FTP服务器用户名】
Path/Filename [<home dir>/config.txt]: switch5300.txt
Section (all|chassis|switch [all]): all
Password:(输入FTP服务器密码)
configUpload complete: All selected config parameters are uploaded
Brocade_5300:admin> 2019/06/11-03:06:08, [CONF-1001], 109, FID 128, INFO, Brocade_5300, configUpload completed successfully for all.
Brocade_5300:admin>
备份过程并不会保存以下信息:
-
dnsConfig information
-
Passwords
2、配置文件恢复
当需要备份中恢复交换机配置时,可以通过configdownload命令将博科交换机的配置从远程服务器恢复到交换机。
博科交换机支持将旧版本的配置文件导入新版本固件的交换机,例如将v6.2.0的配置文件导入v6.3.0固件版本的交换机,或者将v6.4.1 配置文件导入 v7.0.0 版本的交换机。
如果将配置文件导入到不兼容的固件版本交换机,可能导致交换机故障。建议经常保存配置文件,确保备份的配置文件与交换机固件版本相同。
固件v6.1.0及以后的版本,恢复配置文件时不需要disableswitch。某些特殊情况下,恢复配置文件以后会提示你重启交换机。
恢复配置文件:
Brocade_5300:admin> configdownload
Protocol (scp, ftp, sftp, local) [ftp]: ftp
Server Name or IP Address [host]: 10.77.77.79
User Name [user]: test
Path/Filename [<home dir>/config.txt]: switch5300.txt 【指定文件名称】
Section (all|chassis|switch [all]): all
*** CAUTION ***
This command is used to download a backed-up configuration
for a specific switch. If using a file from a different
switch, this file's configuration settings will override
any current switch settings. Downloading a configuration
file, which was uploaded from a different type of switch,
may cause this switch to fail. A switch reboot might be
required for some parameter changes to take effect.
configDownload operation may take several minutes
to complete for large files.
Do you want to continue [y/n]: y
Password:
duplicate license-key "9cSSeQQSTfx"
duplicate license-key "cQecdRfdeB"
duplicate license-key "cQecdQQRjdeD"
duplicate license-key "cQecdQQdhfdeP"
duplicate license-key "RQFBHTgGr9BrZgPZRg3GEYgMBS7DF"
duplicate license-key "GBfGZNJAAFBaCM3tgYA3fXGXBAE7N"
failed to save value of authspec mode to config database
Doing configDownload on switch ...
Activating configDownload without disabling switch:
NOTE: Not all configuration parameters will be downloaded with switch online
configDownload complete: All selected config parameters are downloaded
2019/06/11-03:09:59, [CONF-1000], 110, FID 128, INFO, Brocade_5300, configDownload completed successfully for all.
显示恢复成功。