The display configuration changes command displays the difference between a configuration file and the current running configuration file on the device.
The display configuration commit changes command displays configuration changes at specific configuration rollback points.
display configuration commit changes [ { at commit-id | since commit-id | last number-of-commits } [ with-tag ] ]
display configuration changes [ { running file file-name | file file-name running } [ with-tag ] ]
display configuration changes { running label label | label label running } [ with-tag ]
Parameter | Description | Value |
---|---|---|
at commit-id |
Displays configuration changes at a configuration rollback point. |
The id is a string of 1 to 20 characters and generated by the system automatically. |
since commit-id |
Displays configuration changes since the specified configuration rollback point was generated. |
The id is a string of 1 to 20 characters and generated by the system automatically. |
last number-of-commits |
Specifies the number of the latest configuration rollback points. Configuration changes in these rollback points are displayed. |
The value is an integer ranging from 1 to 80. |
with-tag |
Displays configuration changes that carry the <replace/> tag. |
- |
running |
Displays the running configuration, that is, the configuration data in the running/ database. |
- |
file file-name |
Specifies a configuration file. |
The name is a string of 5 to 64 characters in the format of .zip, .cfg, or .dat. |
label label |
Specifies a label. |
The value is an integer ranging from 1 to 256. |
Usage Scenario
Prerequisites
You have completed the system configuration, and configuration rollback points have been generated. You can run the display configuration commit list command to query generated configuration rollback points.
Follow-up Procedure
Choose to restore the configuration manually or to perform a configuration rollback by checking the configuration changes.
Precautions
When a configuration difference comparison command is run, if repeated commands exist in the same view, the current command fails to be executed.
The specified configuration file specified by file-name must exist on the device.
The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display configuration commit changes at 1000000065
Building configuration
#
aaa
+ local-user huawei password cipher @%@%ym<*-4`Hu=kF;b-%AiAF&C:1@%@%
+ local-user huawei service-type ftp
+ local-user huawei ftp-directory cfcard:/
<HUAWEI> display configuration commit changes since 1000000067
Building configuration...
#
- snmp-agent
#
- snmp-agent local-engineid 800007DB0338AB7F111100
#
- snmp-agent community write public mib-view abc
#
- snmp-agent community write private mib-view abc
#
<HUAWEI> display configuration commit changes
Building configuration
Commit changes of commitId 1000000114 2015-06-18 03:04:59
#
- sysname HUAWEI
#
+ sysname test
#
<HUAWEI> display configuration commit changes last 2 with-tag
Building configuration
#
+ <cmd-script:vlan batch></cmd>vlan batch 1 to 1000
<view-entry></view>aaa
+ domain abc
#
<HUAWEI> display configuration commit changes last 2
Building configuration...
#
- info-center logfile size 16
#
+ info-center logfile size 32
#
<HUAWEI> display configuration changes running file a.cfg
Building configuration
Warning: The specified configuration file is not the same as the current configuration. There are several differences as follow:
#
- sysname HUAWEI
<HUAWEI-A> display configuration changes running label a
2021-03-05 11:37:53.415
Building configuration
.
#
- sysname HUAWEI-A
#
+ sysname HUAWEI
#
Item | Description |
---|---|
Building configuration | Building configuration. |
+ | New configuration. For each modified configuration, both "-" indicating the deleted configuration and "+" indicating the created configuration are displayed. |
- | Deleted configuration. For each modified configuration, both "-" indicating the deleted configuration and "+" indicating the created configuration are displayed. |
Commit changes of commitId | Label of the configuration rollback point, which uniquely identifies the configuration rollback point. |