交换机配置文件和系统映像备份与恢复

拓扑图

为服务器和交换机设置地址(vlan1的地址)

交换机

Switch(config)#int vlan1
Switch(config-if)#ip addr 192.168.1.1 255.255.255.0
Switch(config-if)#no shu
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#
Switch(config-if)#end
 服务器
 

打开服务器的tftp服务

 

 

进入到交换机的特权模式,查看系统映像的文件名

Switch#show flash:
Directory of flash:/
    1  -rw-     4414921          <no date>  c2960-lanbase-mz.122-25.FX.bin
通过tftp工具将文件上传到tftp服务器,用作备份
Switch#copy flash tftp
Source filename []? c2960-lanbase-mz.122-25.FX.bin
Address or name of remote host []? 192.168.1.100
Destination filename [c2960-lanbase-mz.122-25.FX.bin]? switch.bin
Writing c2960-lanbase-mz.122-25.FX.bin....!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 4414921 bytes]
4414921 bytes copied in 3.079 secs (1433000 bytes/sec)
备份成功后可通过 copy tftp flash 命令来下载备份
 
备份配置文件与备份系统镜像一致
Switch#copy running-config tftp
Address or name of remote host []? 192.168.1.100
Destination filename [Switch-confg]?
Writing running-config...!!
[OK - 1050 bytes]
1050 bytes copied in 0 secs
 一样可以使用 copy  tftp  running-config 来恢复备份
posted @ 2018-06-07 18:49  knightysa  阅读(1263)  评论(0编辑  收藏  举报