天天看点

在2950、3550上使用archive命令备份和更新IOS

使用普通的copy命令是无法备份和更新flash中的HTML目录的,这个目录中保存着交换机的WEB管理界面。  

从cisco网站上下来的IOS如果为TAR格式,就说明该IOS中包含了WEB管理套件,因此必须使用archive命令对其进行备份。

备份IOS  

2950#archive tar /create tftp://192.168.1.1/c2950.tar flash:

!!

archiving c2950-i6q4l2-mz.121-11.EA1.bin (2664051 bytes)!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!

archiving config.text (1144 bytes)

archiving vlan.dat (684 bytes)!

archiving html (directory)

archiving html/homepage.htm (3991 bytes)!

archiving html/not_supported.html (1392 bytes)

archiving html/common.js (9449 bytes)!!

archiving html/cms_splash.gif (22152 bytes)!!!!!

archiving html/cms_13.html (1211 bytes)

archiving html/cluster.html (2823 bytes)!

archiving html/Redirect.jar (4226 bytes)!

archiving html/c4v4_disc.sgz (10719 bytes)!!

archiving html/CMS.sgz (1135850 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!

archiving html/CiscoChartPanel.sgz (57732 bytes)!!!!!!!!!!!

archiving html/cms_boot.jar (39500 bytes)!!!!!!!!

archiving info (109 bytes)

archiving info.ver (109 bytes)!

archiving crashinfo (directory)

archiving crashinfo/crashinfo_1 (1317 bytes)

archiving crashinfo/crashinfo_2 (1317 bytes)!

archiving env_vars (320 bytes)

2950#

在TFTP目录下可以找到c2950.tar文件,这就是整个IOS的备份!  

更新IOS过程如下:

首先要格式化flash,将原先的IOS删掉,在这之前,最好先对老的IOS做好备份!

2950#format flash:

format operation may take a while. Continue? [confirm]

format operation will destroy all data in "flash:".  Continue? [confirm]

flashfs[1]: 0 files, 1 directories

flashfs[1]: 0 orphaned files, 0 orphaned directories

flashfs[1]: Total bytes: 7741440

flashfs[1]: Bytes used: 1024

flashfs[1]: Bytes available: 7740416

flashfs[1]: flashfs fsck took 6 seconds.

format of flash complete

看看flash中还有些什么?  

2950#sh flash

Directory of flash:/

No files in directory

7741440 bytes total (7740416 bytes free)

开始更新啦!  

2950#archive tar /xtract tftp://192.168.1.1/c2950-i6k2l2q4-tar.121-20.EA1.tar flash:

Loading c2950-i6k2l2q4-tar.121-20.EA1.tar from 192.168.1.1 (via Vlan1): !

extracting info (111 bytes)

extracting c2950-i6k2l2q4-mz.121-20.EA1.bin (3617099 bytes)!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

html/ (directory)

extracting html/cms_boot.jar (151197 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

extracting html/custom_cms.html (2441 bytes)!

extracting html/start.html (576 bytes)

extracting html/cms_splash.gif (22131 bytes)!!!!!

extracting html/err.html (152 bytes)

extracting html/not_supported.html (1392 bytes)

extracting html/cms_13.html (510 bytes)

extracting html/cluster.html (2822 bytes)!

extracting html/test.htm (2301 bytes)!

extracting html/xhome.htm (25029 bytes)!!!!!

extracting html/back-exp.htm (182 bytes)

extracting html/doc.htm (22112 bytes)!!!!

extracting html/tools.htm (21812 bytes)!!!!!

extracting html/sitewide.js (10627 bytes)!!

extracting html/stylesheet.css (3364 bytes)!

extracting html/appsui.js (3092 bytes)!

extracting html/express-setup.htm (61967 bytes)!!!!!!!!!!!!

extracting html/forms.js (11521 bytes)!!

extracting html/common.js (24978 bytes)!!!!!

extracting html/net_report.htm (21107 bytes)!!!!!

extracting html/cmsplugin.js (1216 bytes)

extracting html/troubleshooting_OS.htm (2851 bytes)!

extracting html/ie_page.htm (2097 bytes)

extracting html/troubleshooting_CMSPlugin.htm (4830 bytes)!

extracting html/splash_screen.htm (1774 bytes)!

extracting html/homepage.htm (605 bytes)

extracting html/ie_report.htm (21165 bytes)!!!!

extracting html/troubleshooting_javascript.htm (8893 bytes)!!

extracting html/troubleshooting_Browser.htm (3704 bytes)!

extracting html/home_help.htm (16166 bytes)!!!!

extracting html/tools_help.htm (13133 bytes)!!

extracting html/ip_help.htm (11533 bytes)!!!

extracting html/es_help.htm (23540 bytes)!!!!

extracting html/doc_help.htm (14186 bytes)!!!

html/xp_w_picpaths/ (directory)

extracting html/xp_w_picpaths/warning.gif (296 bytes)!

extracting html/xp_w_picpaths/pixel.gif (49 bytes)

extracting html/xp_w_picpaths/fatal_error.gif (271 bytes)

extracting html/xp_w_picpaths/question.gif (405 bytes)

extracting html/xp_w_picpaths/confirm.gif (515 bytes)

extracting html/xp_w_picpaths/spacer.gif (49 bytes)!

extracting html/xp_w_picpaths/top.gif (141 bytes)

extracting html/xp_w_picpaths/downleft.gif (53 bytes)

extracting html/xp_w_picpaths/botleft.gif (62 bytes)

extracting html/xp_w_picpaths/arrow.gif (874 bytes)!

extracting html/xp_w_picpaths/download.gif (1287 bytes)

extracting html/xp_w_picpaths/logo.gif (974 bytes)

extracting html/xp_w_picpaths/11_upright.gif (61 bytes)

extracting html/xp_w_picpaths/ip_fig2.gif (5097 bytes)!!

extracting html/xp_w_picpaths/28_upright.gif (110 bytes)

extracting html/xp_w_picpaths/corner_ur_7.gif (53 bytes)

extracting html/xp_w_picpaths/borderback.gif (146 bytes)

extracting html/xp_w_picpaths/upleft2.gif (66 bytes)

extracting html/xp_w_picpaths/button_corner.gif (110 bytes)!

extracting html/xp_w_picpaths/upright.gif (838 bytes)

extracting html/xp_w_picpaths/text_glossary.gif (176 bytes)

extracting html/xp_w_picpaths/title_help.gif (247 bytes)

extracting html/xp_w_picpaths/upright_dot.gif (43 bytes)

extracting html/xp_w_picpaths/ip_fig1.gif (6042 bytes)!!

extracting html/xp_w_picpaths/text_start.gif (239 bytes)

extracting html/xp_w_picpaths/dkgreen.gif (869 bytes)

extracting html/xp_w_picpaths/yellow.gif (881 bytes)!

extracting html/xp_w_picpaths/upright2.gif (49 bytes)

extracting html/xp_w_picpaths/text_print.gif (177 bytes)

extracting html/xp_w_picpaths/green.gif (879 bytes)

extracting html/xp_w_picpaths/downleft1.gif (54 bytes)

extracting html/xp_w_picpaths/glossary_off.gif (118 bytes)!

extracting html/xp_w_picpaths/ip_fig3.gif (9178 bytes)!!

extracting html/xp_w_picpaths/glossary_on.gif (118 bytes)

extracting html/xp_w_picpaths/bottom.gif (149 bytes)

extracting html/xp_w_picpaths/upleft1.gif (51 bytes)

extracting html/xp_w_picpaths/print_on.gif (111 bytes)

extracting html/xp_w_picpaths/left_bkg.gif (146 bytes)!

extracting html/xp_w_picpaths/print_off.gif (111 bytes)

extracting html/CiscoChartPanel.sgz (57732 bytes)!!!!!!!!!!!

extracting html/Redirect.jar (1903 bytes)!

extracting html/CMS.pfj (1753291 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

extracting html/p_w_picpaths.sgz (188026 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

extracting html/help.sgz (476102 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

extracting html/distinfo.dat (276 bytes)

extracting html/cms_disc.sgz (40183 bytes)!!!!!!!!

extracting info.ver (111 bytes)!

[OK - 6749696 bytes]

再看看吧  

最新的哦,2004年1月份出来的IOS  

   2  -rwx         111   Mar 1 1993 00:33:12 +00:00  info

   3  -rwx     3617099   Mar 1 1993 00:35:04 +00:00  c2950-i6k2l2q4-mz.121-20.E

A1.bin

   4  drwx        2688   Mar 1 1993 00:36:38 +00:00  html

  86  -rwx         111   Mar 1 1993 00:36:39 +00:00  info.ver

7741440 bytes total (1030144 bytes free)

2950#reload