H3C S3600 Command Manual-Release 1602(V1.02)

HomeSupportSwitchesH3C S3600 Switch SeriesReference GuidesCommand ReferencesH3C S3600 Command Manual-Release 1602(V1.02)
36-File System Management Command
Title Size Download
36-File System Management Command 129.11 KB

File System Management Configuration Commands

 

The S3600 series Ethernet switches support Intelligent Resilient Framework (IRF), and allow you to access a file on a switch in one of the following ways:

l          To access a file on the specified unit, you need to specify the file in universal resource locator (URL) format and starting with unit[No.]>flash:/, where [No.] represents the unit ID of the switch. For example, if the unit ID of the switch is 1, the URL of a file named text.txt in the root directory of the switch is unit1>flash:/text.txt.

l          To access a file on the current unit, you need to enter the file URL starting with flash:/. For example, the URL of file text.txt in the root directory of the Flash on the current unit is flash:/text.txt.

l          To access a file in the current directory, enter the path name or file name directly. For example, to access file text.txt in the current directory, you can directly input the file name text.txt as the file URL.

 

File System Configuration Commands

 

Note to limit the lengths of device name, directory name, file path and file name within the following ranges regulated for the switch.

l          A directory name should be no more than 91 characters.

l          A file name plus its local path name should be no more than 127 characters.

l          A device name should be no more than 14 characters.

l          A file name plus its complete path name should be no more than 142 characters.

 

cd

Syntax

cd directory

View

User view

Parameters

directory: Target directory.

Description

Use the cd command to enter a specified directory on the Ethernet switch.

The default directory when a user logs onto the switch is the root directory of Flash memory.

Examples

# Enter the directory test from the root directory.

<Sysname> cd test

# Return to the upper directory. Note that keyword cd is followed by a space.

<Sysname> cd ..

After modifying the working directory using the cd command, you can use the pwd command to display the current working directory.

copy

Syntax

copy fileurl-source fileurl-dest

View

User view

Parameters

fileurl-source: Name of the source file.

fileurl-dest: Name of the target file.

Description

Use the copy command to copy a file.

If the fileurl-dest argument identifies an existing file, the existing file will be overwritten after the command is executed successfully.

If the path, rather than the name of the target file is specified, the source file name is used as the target file name by default.

Examples

# Copy file config.cfg from the root directory to directory test, and save the file using name 1.cfg.

<Sysname> copy flash:/config.cfg flash:/test/1.cfg

Copy unit1>flash:/config.cfg to unit1>flash:/test/1.cfg?[Y/N]:y

...

%Copy file unit1>flash:/config.cfg to unit1>flash:/test/1.cfg...Done.

# Copy file config.cfg from the root directory to directory test, and save the file using the original file name.

<Sysname> copy flash:/config.cfg flash:/test

Copy unit1>flash:/config.cfg to unit1>flash:/test/config.cfg?[Y/N]:y

...

%Copy file unit1>flash:/config.cfg to unit1>flash:/test/config.cfg...Done.

delete

Syntax

delete [ /unreserved ] file-url

delete { running-files | standby-files } [ /fabric ] [ /unreserved ]

View

User view

Parameters

/unreserved: Specifies to delete a file completely.

file-url: Path name or file name of a file in the Flash memory. You can use the * character in this argument as a wildcard. For example, the delete *.txt command deletes all the files with .txt as their extensions.

running-files: Specifies to delete all the files with the main attribute.

standby-files: Specifies to delete all the files with the backup attribute.

/fabric: Specifies to delete all the specified files in the fabric.

Description

Use the delete command to delete a specified file from the Flash memory on a switch.

If you execute the delete command with the /unreserved keyword specified, the specified file is permanently deleted. That is, the file cannot be restored. If you execute the delete command without the /unreserved keyword, the specified file is removed to the recycle bin, and you can use the undelete command to restore it.

You can delete files based on file attribute.

l          If you execute the delete running-files command, all the files with the main attribute will be deleted.

l          If you execute the delete standby-files command, all the files with the backup attribute will be deleted.

For a file that has both the main and backup attributes:

l          The delete running-files command only deletes its main attribute instead of the file itself.

l          The delete standby-files command only deletes its backup attribute instead of the file itself.

When you use the delete running-files or delete standby-files command, you will be prompted to confirm whether to delete all files with the main/backup attribute. If you choose yes, the corresponding files are deleted. If you choose no, the system will further to prompt you to confirm the following items orderly:

1)        Delete the image files with the main/backup attribute?

2)        Delete the configuration files with the main/backup attribute?

3)        Delete the Web files with the main/backup attribute?

The corresponding messages are displayed as follows:

Delete the running image file? [Y/N]:

Delete the running config file? [Y/N]:

Delete the running web file? [Y/N]:

 

Delete the backup image file? [Y/N]:

Delete the backup config file? [Y/N]:

Delete the backup web file? [Y/N]:

The corresponding files will be deleted after you choose yes.

 

For deleted files whose names are the same, only the latest deleted file is stored in the recycle bin and can be restored.

 

Examples

# Delete the file test/test.txt on the local unit.

<Sysname> delete test/test.txt

Delete unit1>flash:/test/test.txt?[Y/N]:y

.

%Delete file unit1>flash:/test/test.txt...Done.

# Delete all the main Web files on the local unit.

<Sysname> delete running-files

Delete all the running files? [Y/N]:n

Delete the running image file? [Y/N]:n

Delete the running config file? [Y/N]:n

Delete the running web file? [Y/N]:y

Start deleting ......

Deleting ... done

# Delete all the main files in the fabric.

<Sysname> delete running-files /fabric

Delete the running files ? [Y/N]:y

Start deleting ..........

 Unit1 delete success!

 Unit2 delete success!

%Apr  4 11:25:40:973 2000 Sysname VFS/6/OPLOG:- 1 - Unit1 delete success!

%Apr  4 11:25:41:56 2000 Sysname VFS/6/OPLOG:- 1 – Unit2 delete success!

Deleting ... done

dir

Syntax

dir [ /all ] [ /fabric | file-url ]

View

User view

Parameters

/all: Specifies to display the information about all the files, including those stored in the recycle bin.

/fabric: Specifies to display the information about all the specified files in the fabric.

file-url: Path name or the name of a file in the Flash memory. You can use the * character as a wildcard. For example, the dir *.txt command displays the information about all the files with the extension of .txt in the current directory.

Description

Use the dir command to display the information about the specified files or directories in the Flash memory on a switch.

l          If executed with the /all keyword, the command will display information about all files, including the files in the recycle bin. If executed without the /all keyword, the command will not display the files in the recycle bin.

l          If executed with the /fabric keyword, the command will display information about files and folders in the root directory of all the devices in the fabric. If executed without the /fabric keyword, the command will display information about files and folders in the root directory of the current device.

l          If executed with the file-url argument, the command will display information about files and folders in the specified directory. If executed without the file-url argument, the command will display information about files and folders in the current working directory.

In the output information, files with the main, backup or main/backup attribute are tagged with special characters:

l          main: (*)

l          backup: (b)

l          main/backup: (*b)

 

In the output information of the dir /all command, deleted files (that is, those in the recycle bin) are embraced in brackets. The displayed directory of a deleted file is the directory to which the file belongs before it is deleted.

 

Examples

# Display information about all the ordinary files in the root directory of the file system on the local unit.

<Sysname> dir

Directory of unit1>flash:/

   1 (*)   -rw-   5792495  Apr 02 2000 00:06:50   test1.bin

   2 (*)   -rw-      1965  Apr 01 2000 23:59:13   config.cfg

   3       -rw-   5841301  Apr 02 2000 21:42:13   test2.bin

   4       -rw-       224  Apr 02 2000 01:36:30   test3.bin

   5       -rw-    279296  Apr 02 2000 00:22:01   test.abc

15367 KB total (3720 KB free)

(*) -with main attribute   (b) -with backup attribute

(*b) -with both main and backup attribute  

# Display information about all the files (including the files in the recycle bin) in the root directory of the file system of the fabric.

<Sysname> dir /all /fabric

Directory of unit1>flash:/

   1 (*)   -rw-   5792495  Apr 02 2000 00:06:50   test1.bin

   2       -rwh         4  Apr 01 2000 23:55:26   snmpboots

   3       -rwh       151  Apr 02 2000 00:05:53   private-data.txt

   4 (*)   -rw-      1965  Apr 01 2000 23:59:13   config.cfg

   5       -rw-   5841301  Apr 02 2000 21:42:13   test2.bin

   6       -rw-       224  Apr 02 2000 01:36:30   test3.bin

   7       -rw-    279296  Apr 02 2000 00:22:01   test.abc

   8       -rw-      2370  Apr 02 2000 02:49:12   [1.cfg]

15367 KB total (3720 KB free)

Directory of unit2>flash:/

   0       -rwh         4  Apr 01 2000 23:55:24   snmpboots

   1 (*)   -rw-   4724347  Apr 01 2000 23:59:45   test.bin

   2 (*)   -rw-      1475  Apr 01 2000 23:59:53   config.cfg

   3       -rw-      1737  Apr 02 2000 00:46:21   cfg.cfg

   4       -rw-    279296  Apr 02 2000 00:21:55   love.rar

   5       -rw-       428  Apr 02 2000 13:07:11   hostkey

   6       -rwh       151  Apr 01 2000 23:58:39   private-data.txt

   7       -rw-       572  Apr 02 2000 13:07:20   serverkey

   8       -rw-      1589  Apr 02 2000 00:58:20   1.cfg

15367 KB total (10475 KB free)

(*) -with main attribute   (b) -with backup attribute

(*b) -with both main and backup attribute

# Display information about all the files whose names begin with the character t (including those in the recycle bin) in the local directory unit1>flash:/test/.

<Sysname> dir /all test/t*

Directory of unit1>flash:/test/

   0       -rw-    279296  Apr 04 2000 14:45:19   test.txt

15367 KB total (3720 KB free)

(*) -with main attribute   (b) -with backup attribute

(*b) -with both main and backup attribute

execute

Syntax

execute filename

View

System view

Parameters

filename: Batch file, with the extension .bat.

Description

Use the execute command to execute the specified batch file. Executing a batch file is to execute a set of commands in the batch file one by one.

Note that:

l          A batch file cannot contain any invisible character. If any invisible character is found, the system will abort the execution of the batch file, that is, the remaining commands in the batch file will not be executed, but the executed operations will not be cancelled.

l          Not every command in a batch file is sure to be executed. For example, if a certain command is not correctly configured, the system omits this command and goes to the next one.

l          Each configuration command in a batch file must be a standard configuration command, meaning that the configuration information can be displayed with the display current-configuration command after this command is configured successfully; otherwise, this command may not be executed correctly.

Examples

# Execute the batch file named test.bat under the directory flash:/.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] execute test.bat

<Sysname>

....

%Created dir unit1>flash:/test3.

file prompt

Syntax

file prompt { alert | quiet }

View

System view

Parameters

alert: Specifies to prompt for confirmation before performing file-related operations that have potential risks.

quiet: Specifies to disable prompts for file-related operations.

Description

Use the file prompt command to configure the prompt mode for file-related operations.

By default, alert mode is used, by which a switch prompts for confirmation before performing file-related operations that have potential risks.

If you set the prompt mode of the file-related operations to quiet, the switch does not prompt for confirmation before performing file-related operations. In this case, the system is more likely to be damaged due to some maloperations. For example:

l          If the prompt mode is set to alert, the following messages will be displayed when you delete a file:

<Sysname> delete unit1>flash:/te.txt

Delete unit1>flash:/te.txt?[Y/N]:y

......

%Delete file unit1>flash:/te.txt...Done.

The system waits for you to confirm for 30 seconds. If you do not input any confirmation in 30 seconds, the system cancels this file operation, as shown in the following:

<Sysname> delete unit1>flash:/tt.txt

Delete unit1>flash:/tt.txt?[Y/N]:

<Sysname>

l          If the prompt mode is set to quiet, the following messages will be displayed when you delete a file:

<Sysname> delete unit1>flash:/te.txt

....

%Delete file unit1>flash:/te.txt...Done.    

Examples

# Set the prompt mode to quiet for file-related operations.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] file prompt quiet

fixdisk

Syntax

fixdisk device

View

User view

Parameters

device: Name of a device.

Description

Use the fixdisk command to restore space on the Flash memory.

In case that space on the Flash memory may become unavailable for reasons such as abnormal operations, you can run this command to restore the space.

Examples

# Restore space on the Flash memory.

<Sysname> fixdisk unit1>flash:

Fixdisk flash: may take some time to complete.

%Fixdisk unit1>flash: completed.

format

Syntax

format device

View

User view

Parameters

device: Name of a device.

Description

Use the format command to format the Flash memory.

 

The format operation clears all the files on the Flash memory, and the operation is irretrievable.

 

Examples

# Format the Flash memory.

<Sysname>format unit1>flash:

All data on unit1>flash: will be lost , proceed with format ? [Y/N]:y

..............................

%Format unit1>flash: completed.

mkdir

Syntax

mkdir directory

View

User view

Parameters

directory: Name of a directory.

Description

Use the mkdir command to create a subdirectory in the specified directory of a Flash memory.

Note that:

l          The name of the subdirectory to be created must be unique under the specified directory. Otherwise, you will fail to create the subdirectory under the directory.

l          To use this command to create a subdirectory, the specified directory must exist. For instance, to create subdirectory flash:/test/mytest, the test directory must exist. Otherwise, you will fail to create the subdirectory.

Examples

# Create a directory in the current directory, with the name being test.

<Sysname> mkdir test

....

%Created dir unit1>flash:/test.

# Create subdirectory mytest in the directory test.

<Sysname> mkdir test/mytest

..

%Created dir unit1>flash:/test/mytest.

more

Syntax

more file-url

View

User view

Parameters

file-url: Path name or file name of a file in the Flash memory.

Description

Use the more command to display the contents of a specified file.

Currently, the file system only supports to display the contents of text files.

Examples

# Display the content of the file test.txt.

<Sysname> more test.txt

AppWizard has created this test application for you.

This file contains a summary of what you will find in each of the files that make up your test application.

Test.dsp

This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally.

# Display the content of the file testcfg.cfg.

<Sysname> more testcfg.cfg

 

#

 sysname Sysname

#

 configure-user count 5

#

vlan 2

#

return

<Sysname>

move

Syntax

move fileurl-source fileurl-dest

View

User view

Parameters

fileurl-source: Name of the source file.

fileurl-dest: Name of the target file.

Description

Use the move command to move a file to a specified directory.

If the target file name is the same as an existing file, the existing file will be overwritten after the command is executed successfully.

If the path, rather than the name of the target file is specified, the source file name is used as the target file name by default.

Examples

# Move the file 1.txt from flash:/ to flash:/a/ within unit1, with the name unchanged.

<Sysname>move unit1>flash:/1.txt unit1>flash:/a/

Move unit1>flash:/1.txt to unit1>flash:/a/1.txt?[Y/N]:y

.

%Moved file unit1>flash:/1.txt to unit1>flash:/a/1.txt.

# Move the file flash:/22.txt to unit1>flash:/test/, and overwrite the file in the directory unit1>flash:/test.

<Sysname>move 22.txt unit1>flash:/test

Move unit1>flash:/22.txt to unit1>flash:/test/22.txt?[Y/N]:y

The file unit1>flash:/test/22.txt exists. Overwrite it?[Y/N]:y

The file will be permanently deleted from flash, please wait.

....

%Moved file unit1>flash:/22.txt to unit1>flash:/test/22.txt.

pwd

Syntax

pwd

View

User view

Parameters

None

Description

Use the pwd command to display the current working path of the login user.

Examples

# Display the current working path.

<Sysname> pwd

unit1>flash:

rename

Syntax

rename fileurl-source fileurl-dest

View

User view

Parameters

fileurl-source: Original path name or file name of a file in the Flash memory.

fileurl-dest: Target path name or file name.

Description

Use the rename command to rename a file or a directory.

If the target file name or directory name is the same with any existing file name or directory name, you will fail to perform the rename operation.

Examples

# Rename the file config.txt to config.bak.

<Sysname>rename config.txt config.bak

Rename unit1>flash:/config.txt to unit1>flash:/config.bak?[Y/N]:y

.

%Renamed file unit1>flash:/config.txt to unit1>flash:/config.bak.

reset recycle-bin

Syntax

reset recycle-bin [ file-url ] [ /force ]

reset recycle-bin [ /fabric ]

View

User view

Parameters

file-url: Path name or file name of a file in the Flash memory. This argument supports the wildcard “*”. For example, *.txt means all the files with an extension of txt.

/force: Specifies not to prompt for confirmation before deleting files.

/fabric: Specifies to clear the recycle bins of all Flash memories in the fabric.

Description

Use the reset recycle-bin command to permanently delete the files in the recycle bin in the current directory.

Use the reset recycle-bin file-url command to permanently delete the files in the recycle bin in the specified directory.

By default, the file operation reminding mode is alert, meaning that when you clear the files in the recycle bin on the local unit, the system will ask for your confirmation for each file you want to delete. However, if you specify the /force keyword in the command, the system will not ask for your confirmation.

Use the reset recycle-bin /fabric command to permanently delete files in the recycle bin of all the devices in the fabric.

 

The system will not prompt you to confirm deletion of each file when you clear recycle bins throughout the fabric.

 

The files deleted by the delete command without the /unreserved keyword are moved to the recycle bin. To delete them permanently, you can use the reset recycle-bin command.

Examples

# There are three files flash:/a.cfg, flash:/b.cfg, and flash:/test/c.cfg in the recycle bin. Permanently delete file flash:/a.cfg and flash:/b.cfg.

l          Display all the files in the recycle bin in directory flash:.

<Sysname> dir /all

Directory of flash:/

 

   0     -rwh      3080  Apr 26 2000 16:41:43   private-data.txt

   1     -rw-      2416  Apr 26 2000 13:45:36   config.cfg

   2     -rw-   8036197  May 14 2000 10:13:18   main.bin

   3     -rw-      2386  Apr 26 2000 13:30:30   back.cfg

   4     drw-         -  May 08 2000 09:49:25   test

   5     -rwh       716  Apr 24 2007 16:17:30   hostkey

   6     -rwh       572  Apr 24 2007 16:17:44   serverkey

   7     -rw-      2386  May 08 2000 11:14:20   [a.cfg]

   8     -rw-      3608  Dec 03 2007 17:29:30   [b.cfg]

 

15367 KB total (6730 KB free)

//The above information indicates that in directory flash:, there are two files a.cfg and b.cfg in the recycle bin.

l          Delete the files in directory flash: that are already in the recycle bin.

<Sysname> reset recycle-bin

Clear flash:/~/a.cfg ?[Y/N]:y

Clearing files from flash may take a long time. Please wait...

....

%Cleared file flash:/~/a.cfg.

Clear flash:/~/b.cfg ?[Y/N]:y

Clearing files from flash may take a long time. Please wait...

......

%Cleared file flash:/~/b.cfg...

l          In directory flash:, check whether all the files in the recycle bin are deleted.

<Sysname> dir /all

Directory of flash:/

 

   0     -rwh      3080  Apr 26 2000 16:41:43   private-data.txt

   1     -rw-      2416  Apr 26 2000 13:45:36   config.cfg

   2     -rw-   8036197  May 14 2000 10:13:18   main.bin

   3     -rw-      2386  Apr 26 2000 13:30:30   back.cfg

   4     drw-         -  May 08 2000 09:49:25   test

   5     -rwh       716  Apr 24 2007 16:17:30   hostkey

   6     -rwh       572  Apr 24 2007 16:17:44   serverkey

 

15367 KB total (6734 KB free)

// The above information indicates that file flash:/a.cfg and flash:/b.cfg are deleted permanently.

l          In directory flash:/test, see whether the file in the recycle bin is deleted or not.

<Sysname> cd test

<Sysname> dir /all

Directory of flash:/test/

 

   0     drw-         -  Dec 03 2007 18:19:09   subtest

   1     -rw-      2386  Dec 03 2007 18:43:41   [c.cfg]

 

14605 KB total (6734 KB free)

// The above information indicates that file flash:/test/c.cfg in directory flash:/test is not deleted and is still in the recycle bin.

# Clear the recycle bins of all the devices in the fabric.

<Sysname>reset recycle-bin /fabric

Squeeze the recycle bins in fabric ? [Y/N]:y

 Unit1 reset success!

 Unit2 reset success!

rmdir

Syntax

rmdir directory

View

User view

Parameters

directory: Name of a directory.

Description

Use the rmdir command to delete a directory.

As only empty directories can be deleted, you need to clear a directory before deleting it.

Examples

# Delete the directory named dd.

<Sysname> rmdir dd

Rmdir unit1>flash:/dd?[Y/N]:y

....

%Removed directory unit1>flash:/dd.

undelete

Syntax

undelete file-url

View

User view

Parameters

file-url: Path name or file name of a file in the Flash memory.

Description

Use the undelete command to restore a deleted file from the recycle bin.

If the name of the file to be restored is the same as that of an existing file, the existing file will be overwritten after the command is executed successfully.

Examples

# Restore the deleted file named sample.bak.

<Sysname> undelete sample.bak

Undelete unit1>flash:/sample.bak ?[Y/N]:y

% Undeleted file unit1>flash:/sample.bak.

update fabric

Syntax

update fabric file-name

View

User view

Parameters

file-name: Name of the file to be upgraded, a string comprising 1 to 64 characters.

Description

Use the update fabric command to use an app file, Boot ROM or Web file on a device in the fabric to upgrade all the units in the fabric.

 

Use the update fabric command after all traffics are stopped.

 

Global upgrade to app, Web and Boot ROM files is supported currently. The types of files to be upgraded can be distinguished by the file extension. For example, test1.bin, test2.btm, and test3.web represent host software, Boot ROM files and Web files respectively.

 

l          You can upgrade files with such extensions as .web, .bin and .btm.

l          The file used for upgrading must exist in the root directory of a unit in the fabric.

l          After the upgrade is completed, the file used for upgrading will be copied to the root directories of other units in the fabric.

l          When you execute the update fabric command, the system first collects the free space information of each unit and then decides whether the available Flash memory space is enough on each unit. The available space of the Flash should be at least 1 K larger than the size of the file used for upgrading. If any space inefficiency is found, the system will prompt the user to provide enough space on the Flash memory of the unit. Otherwise, the upgrade cannot be implemented.

l          Before the file is copied to all units, the system collects version information of files in the corresponding type, compares the version compatibility, and outputs the result. If the file used for upgrading cannot replace the corresponding file on any unit, the command fails and a message is given, describing the failure reason.

 

Examples

# Upgrade all units in the fabric with the app file named test.bin on the local unit.

<Sysname>display irf-fabric

Fabric name is fab, system mode is L3.

Fabric authentication : no authentication, number of units in stack: 1.

Unit Name                                 Unit ID

First                                     1(*)

First                                     2

First                                     8

<Sysname>update fabric test.bin

 This will update the Fabric. Continue? [Y/N] y

 The software is verifying ...

 The result of verification is :

 Unit ID   Free space(bytes)       Enough       Version comparison

    1          2126848               Y              Y

    2          2125824               Y              Y

    8          1439744               Y              Y

 warning: the verification is completed, start the file transmission [Y/N] y

 The fabric is being updated, 100%

 The test.bin is stored on unit 1 successfully

 The test.bin is stored on unit 2 successfully

 The test.bin is stored on unit 8 successfully

 Do you want to set test.bin to be running agent next time to boot[Y/N] y

The test.bin is configured successfully

File Attribute Configuration Commands

boot attribute-switch

Syntax

boot attribute-switch { all | app | configuration | web } fabric

View

User view

Parameters

all: Specifies all the files, including app files, configuration files and Web files.

app: Specifies app files.

configuration: Specifies configuration files.

web: Specifies Web files.

fabric: Specifies to apply the configuration to the whole fabric.

Description

Use the boot attribute-switch command to switch between the main and backup attribute for all the files or a specified type of files. That is, change a file with the main attribute to one with the backup attribute, or vice versa.

Examples

# Switch the attributes of all the files in the fabric.

<Sysname> boot attribute-switch all fabric

 The boot, web and configuration file's backup-attribute and main-attribute will exchange.

 Are you sure? [Y/N] y

 The boot, web and configuration file's backup-attribute and main-attribute successfully exchanged on unit 1!

 The boot, web and configuration file's backup-attribute and main-attribute successfully exchanged on unit 2!

boot boot-loader

Syntax

boot boot-loader file-url [ fabric ]

View

User view

Parameters

file-url: Path or the name of the app file in the Flash memory, a string comprising 1 to 64 characters.

fabric: Specifies to apply the configuration to the whole fabric.

Description

Use the boot boot-loader command to configure an app file of the fabric or of a device in the fabric to be with the main attribute. The app file specified by this command becomes the main startup file when the device starts up next time.

If you execute the boot boot-loader command without the fabric keyword, the configuration applies to the local unit only.

 

Before configuring the main or backup attribute for a file in the fabric, make sure the file already exists on all devices in the fabric. This is because Ethernet switches do not allows you to specify an app file in other unit’s Flash memory as the app startup file of the local unit.

 

Examples

# Configure the file boot.bin to be the main startup file of the fabric.

<Sysname> boot boot-loader boot.bin fabric

 The specified file will be booted next time on unit 1!

 The specified file will be booted next time on unit 2!

boot boot-loader backup-attribute

Syntax

boot boot-loader backup-attribute file-url [ fabric ]

View

User view

Parameters

file-url: Path or the name of the app file in the Flash memory, a string comprising 1 to 64 characters.

fabric: Specifies to apply the configuration to the whole fabric.

Description

Use the boot boot-loader backup-attribute command to configure an app file of the fabric or of a device in the fabric to be with the backup attribute. The app file specified by this command becomes the backup startup file when the device starts up next time. When the main startup file is unavailable, the backup startup file is used to start the switch.

If you execute the boot boot-loader backup-attribute command without the fabric keyword, the configuration applies to the local unit only.

 

Before configuring the main or backup attribute for a file in the fabric, make sure the file already exists on all devices in the fabric. This is because Ethernet switches do not allows you to specify an app file in other unit’s Flash memory as the app startup file of the local unit.

 

Examples

# Configure the file backup.bin to be the backup startup file of the fabric.

<Sysname> boot boot-loader backup-attribute backup.bin fabric

 Set boot file backup-attribute successfully on unit 1!

 Set boot file backup-attribute successfully on unit 2!

boot web-package

Syntax

boot web-package webfile { backup | main }

View

User view

Parameters

webfile: Name of a Web file, a string comprising 5 to 127 characters (including the extension .web).

main: Specifies the file to be with the main attribute.

backup: Specifies the file to be with the backup attribute.

Description

Use the boot web-package command to configure a Web file in the fabric to be with the main or backup attribute.

 

l          Before configuring the main or backup attribute for a Web file in the fabric, make sure the file exists on all devices in the fabric.

l          The configuration of the main or backup attribute for a Web file takes effect immediately without restarting the device.

l          After you upgrade a Web file, you need to specify the new Web file in the Bootrom menu after restarting the switch or specify a new Web file by using the boot web-package command. Otherwise, the Web server cannot function normally.

 

Related commands: display web package

Examples

# Configure the Web file named boot.web to be with the main attribute.

<Sysname> boot web-package boot.web main

display boot-loader

Syntax

display boot-loader [ unit unit-id ]

View

Any view

Parameters

unit unit-id: Specifies the unit ID of a switch. The APP startup file information of the specified unit will be displayed.

Description

Use the display boot-loader command to display the information about the APP startup files of the fabric or of a specific device in the fabric. Displayed information includes the current APP startup file name, and the main and backup APP startup files to be used when the switch starts up next time.

If you execute the display boot-loader command without unit unit-id, the information of all app startup files of the fabric will be displayed.

Examples

# Display information about the app startup files of unit 1.

<Sysname> display boot-loader unit 1

 Unit 1

   The current boot app is: test.bin              

   The main boot app is:     test.bin              

   The backup boot app is:   testbak.bin            

display web package

Syntax

display web package

View

Any view

Parameters

None

Description

Use the display web package command to display information about the Web file used by the device, including the name of the currently used Web file, and the name of the Web files with the main and backup attributes used for next startup.

Examples

# Display information about the Web file used by the device.

<Sysname>display web package

The current using web package is: flash:/h3c-http3.1.5-0040.web

The main web package is: unit1>flash:/h3c-http3.1.5-0040.web

The backup web package is: unit1>flash:/

startup bootrom-access enable

Syntax

startup bootrom-access enable

undo startup bootrom-access enable

View

User view

Parameters

None

Description

Use the startup bootrom-access enable command to specify a switch to prompt users to use customized password to enter the BOOT menu.

Use the undo startup bootrom-access enable command to disable the above function.

By default, users have to use customized passwords to enter the BOOT menu.

You can use the display startup command in the Configuration File Management part of the manual to view the execution results of these two commands.

Examples

# Specify to prompt users to use customized passwords to enter the BOOT menu.

<Sysname> startup bootrom-access enable

<Sysname> display startup unit 1

MainBoard:

  Current Startup saved-configuration file:          flash:/config.cfg

  Next main startup saved-configuration file:        flash:/config.cfg

  Next backup startup saved-configuration file:      NULL

  Bootrom-access enable state:                       enabled

Configuration File Backup and Restore Commands

backup current-configuration

Syntax

backup { unit unit-id | fabric } current-configuration to { dest-addr | dest-hostname } filename.cfg

View

User view

Parameters

unit unit-id: Specifies the unit ID of a switch. The configuration of the specified unit will be backed up.

fabric: Specifies to back up the configuration of the whole fabric system.

dest-addr: IP address of a TFTP server.

dest-hostname: Host name of a TFTP server.

filename.cfg: Name of the configuration file to which the current configuration will be backed up, a string of 5 to 56 characters (including the extension .cfg).

Description

Use the backup unit unit-id current-configuration to command to back up the current configuration of the specified switch to the specified TFTP server.

Use the backup fabric current-configuration to command to back up the current configurations of all the switches in the fabric to the specified TFTP server.

Examples

# Back up the current configuration of unit 8 to the file aaa.cfg on the TFTP server whose IP address is 1.1.1.253.

<Sysname> backup unit 8 current-configuration to 1.1.1.253 aaa.cfg

  Backup current configuration to 1.1.1.253. Please wait...

  File will be transferred in binary mode. 

  Copying file to remote tftp server. Please wait...

  TFTP:     1958 bytes sent in 2 second(s).

 

  File uploaded successfully.

 

  Unit 8: Backup current configuration finished!

# Back up the current configuration of the whole fabric to the file aaa.cfg on the TFTP server whose IP address is 1.1.1.253.

<Sysname> backup fabric current-configuration to 1.1.1.253 aaa.cfg

  Backup current configuration to 1.1.1.253. Please wait...

  File will be transferred in binary mode. 

  Copying file to remote tftp server. Please wait...

  TFTP:     2029 bytes sent in 2 second(s).

 

  File uploaded successfully.

 

  Unit 7: Backup current configuration finished!

  Unit 8: Backup current configuration finished!

restore startup-configuration

Syntax

restore { unit unit-id | fabric } startup-configuration from { source-addr | source-hostname } filename.cfg

View

User view

Parameters

unit unit-id: Specifies the unit ID of a switch. The configuration of the specified unit will be restored.

fabric: Specifies to restore the configuration of the whole fabric system.

source-addr: IP address of a TFTP server.

source-hostname: Host name of a TFTP server

filename.cfg: Name of the configuration file to be restored to, a string of 5 to 56 characters (including the extension .cfg).

Description

Use the restore unit unit-id startup-configuration from command to restore the startup configuration of the specified switch from the configuration file backed on the specified TFTP server.

Use the restore fabric startup-configuration from command to restore the startup configuration of the whole fabric from the configuration file backed on the specified TFTP server.

Examples

# Restore the startup configuration of unit 7 from the file aaa.cfg on the TFTP server with the IP address 1.1.1.253.

<Sysname> restore unit 7 startup-configuration from 1.1.1.253 aaa.cfg

Restore startup configuration from 1.1.1.253. Please wait...

  File will be transferred in binary mode. 

  Downloading file from remote tftp server, please wait...

  TFTP:     1958 bytes sent in 0 second(s).

 

  File downloaded successfully.

 

  Unit 7: Restore startup current configuration finished!

# Restore the startup configuration of the whole fabric from the file bbb.cfg on the TFTP server with the IP address 1.1.1.253.

<Sysname> restore fabric startup-configuration from 1.1.1.253 bbb.cfg

Restore startup configuration from 1.1.1.253. Please wait...

  File will be transferred in binary mode. 

  Downloading file from remote tftp server, please wait...

  TFTP:     2029 bytes sent in 0 second(s).

 

  File downloaded successfully.

 

  Unit 7: Restore startup current configuration finished!

  Unit 8: Restore startup current configuration finished!

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网