cisco ASA5510配置备份与还原
一、在操作的本机上安装tftp软件,这里使用tftpdwin.exe,不使用SolarWinds-TFTPServer个
人感觉不是很好用,每次都连不上。
软件安装完成后,关闭本机的防火墙,从开始菜单里找到TftpdWin并运行TFTP Server开启本地
配置机的tftp,以便于将设备配置备份到本地。
TFTP Server开启后的截图,左下角会有一个Server turnde-on的运行提示。
二、telnet登陆到ASA5510,进入到特权模式,进行以下操作:
1、从备份设备配置到本地:
ciscoasa#copy run//可以使用Tab键自动补齐命令。
ciscoasa#copy running-config tftp//本行命令,复制正在运行的配置文
件至tftp服务器
Source filename[running-config]?//这里的选择要复制的源文件名称,
直接回车就可以,也可以输入running-config。
Address or name of remote host[]?10.86.20.27//这里输入tftp服务器的地址
(更改为你本机的IP)。
Destination filename[running-config]?//要保存的文件名称。可直接回
车,使用默认名称。
Cryptochecksum:3f5706ea8eb9b04f563f2abb d7462513
!!!
9511bytes copied in 3.690secs(3170bytes/sec)//配置文件备份成功。用时、
文件大小及速率。
注:备份文件的存放位置,在TFTP Server的安装目录。如图:
2、ASA5510bin备份方式与上面类似,只是多了部分文件路径的问题。
ciscoasa#copy fl
ciscoasa#copy flash:?//显示设备flash中的文件。
flash:/asa708-k8.bin flash:/asa821-k8.bin
flash:/asdm-508.bin flash:/asdm-621.bin
flash:/coredumpinfo flash:/crypto_archive
flash:/log flash:/securedesktop-asa-3.2.1.103-k9.pkg
flash:/sslclient-win-1.1.0.154.pkg flash:/startup-config
ciscoasa#copy flash:asa708-k8.bin tftp//备份asa708-k8.bin Source filename[asa708-k8.bin]?//要备份的文件名称,直接回车
Address or name of remote host[]?10.86.20.27//tftp服务器地址(你
本机的IP) Destination filename[asa708-k8.bin]?//要保存为的文件名称直接回车
Writing file tftp://10.86.20.27/asa708-k8.bin...
!!!!!!!!!!!!!!!!
5548032bytes copied in41.430secs(135317bytes/sec)//备份完成
注:备份文件存放目录,同1中。
3、设备配置的还原
在还原配置之前,需要把之间备份出来的running-config文件进行重命名为startup-config,之后再进行下面操作,同样使用telnet登陆,进入特权模式。
ciscoasa#copy tftp startup-config//从tftp还原
startup-config配置。
Address or name of remote host[]?10.86.20.27//输入tftp服务器地
址(你本机的IP)。
Source filename[]?startup-config//输入配置文件名
startup-config
4、flash文件还原,还原文件的存放位置一定要放在TFTP Server的安装目录。ciscoasa#copy tftp?
disk0:Copy to disk0:file system
disk1:Copy to disk1:file system
flash:Copy to flash:file system
ftp:Copy to ftp:file system
running-config Update(merge with)current system configuration
smb:Copy to smb:file system
startup-config Copy to startup configuration
system:Copy to system:file system
tftp:Copy to tftp:file system
ciscoasa#copy tftp fla
ciscoasa#copy tftp flash:?//查看需要还原的bin文件
flash:/asa708-k8.bin flash:/asa821-k8.bin
flash:/asdm-508.bin flash:/asdm-621.bin
flash:/coredumpinfo flash:/crypto_archive
flash:/log flash:/securedesktop-asa-3.2.1.103-k9.pkg
flash:/sslclient-win-1.1.0.154.pkg flash:/startup-config
ciscoasa#copy tftp flash:/asdm-508.bin//选择你需要还原的bin文件
Address or name of remote host[]?10.86.20.27//输入tftp主机地址
Source filename[]?asdm-508.bin//输入源文件名称(含扩展名)
Destination filename[asdm-508.bin]?//被还原的文件名,直接回车
%Warning:There is a file already existing with this name
Do you want to over write?[confirm]//按提示输入“confirm”,或者直接回车
5、注意事项
在使用配置备份文件恢复时,如果在原配置文件中有使用其它加密方式进行过加密的密文一定要更改为明文密码,如(remote VPN中):
tunnel-group cisco ipsec-attributes
pre-shared-key*//这里的*号一定要换成你原来配置的明文密
码。否则还原后,无法正常使用VPN client 比如:我这里的pre-shared-key是123456789,需要把*替换为:123456789其配置文件其它位置的*号,在使用备份文件前也注意先把*号部分更改为你原来的明文密码。
6、恢复完成后,建议使用reload noconfirm命令进行重启。重启后,设备应该就能恢复正常工作了。