H3C系统及配置文件备份操作

  • 格式:doc
  • 大小:66.50 KB
  • 文档页数:6

下载文档原格式

  / 6
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

系统及配置文件备份操作

实验任务一:使用系统操作及文件操作的基本命令

步骤一:进入系统视图

执行system-view命令进入系统视图。系统视图的提示符为[系统名]。执行quit命令可以从系统视图切换到用户视图。

步骤二:练习使用帮助特性和补全键

s? sysname ?

步骤三:更改系统名称

[H3C]sysname YourName

[YourName]

步骤四:更改系统时间

[YourName]display clock

17:28:07 UTC Mon 09/08/2008

[YourName]quit

clock datetime 10:20:30 10/01/2008

display clock

10:20:32 UTC Wed 10/01/2008

步骤五:显示系统运行配置

display current-configuration

步骤六:显示保存的配置

display saved-configuration

此时尚未保存配置,因此不存在saved-configuration

步骤七:保存配置

默认配置文件名通常为startup.cfg,某些版本为config.cfg。

save

The current configuration will be written to the device. Are you sure? [Y/N]:

Please input the file name(*.cfg)[cf:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Now saving current configuration to the device.

Saving configuration cf:/startup.cfg. Please wait...

.

Configuration is saved to cf successfully.........

save

The current configuration will be written to the device. Are you sure? [Y/N]:y Please input the file name(*.cfg)[cf:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

cf:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait...

Now saving current configuration to the device.

Saving configuration cf:/startup.cfg. Please wait...

.

Configuration is saved to cf successfully.

由于执行了save命令,保存配置与运行配置一致。

步骤八:删除和清空配置

[YourName]undo sysname

reset saved-configuration

The saved configuration file will be erased. Are you sure? [Y/N]:y Configuration file in cf is being cleared.

Please wait ...

........

Configuration file in cf is cleared.

reboot

Start to check configuration with next startup configuration file, please wait ......

This command will reboot the device. Current configuration may be lost in next startup if you continue. Continue? [Y/N]:Y

步骤九:显示文件目录

pwd

cf:

dir

Directory of cf:/

0 drw- - Jan 19 2007 18:26:34 logfile

1 -rw- 16337860 Aug 03 2007 17:59:36 msr30-cmw520-r1206p01-si.bin

2 -rw- 739 Oct 01 2008 10:15:54 startup.cfg

249852 KB total (221648 KB free)

File system type of cf: FAT32

步骤十:显示文本文件内容

用more命令

步骤十一:改变当前工作路径

使cd命令

步骤十二:文件删除

用save、dir、delete、dir命令

虽然删除了该文件,但是在删除该文件前后,为什么CF卡的可用内存空间却没有变化呢。那是因为使用delete命令删除文件时,被删除的文件被保存在回收站中,仍会占用存储空间。如果用户经常使用该命令删除文件,则可能导致设备的存储空间不足。如果要彻底删除回收站中的某个废弃文件,必须在文件的原归属目录下执行reset

recycle-bin命令,才可以将回收站中的废弃文件彻底删除,以回收存储空间。

dir /all命令显示内容包括隐藏文件、隐藏子文件夹以及回收站中的原属于该目录下的文件的信息,回收站里的文件会以方括号“[ ]”标出。文件myconfig.cfg应该仍然存在于CF卡的回收站中。

用reset recycle-bin命令清空回收站后,可发现文件列表中已经找不到myconfig.cfg文件,并且可用内存空间已经增加。