configuration replace file
Use configuration replace file to perform configuration rollback.
Syntax
configuration replace file filename
Views
System view
Predefined user roles
network-admin
Parameters
filename: Specifies the name of the replacement configuration file suffixed with the .cfg extension for
configuration rollback. Excluding the .cfg extension, the file name is a case-insensitive string of 1 to
255 characters and can include path information. Valid characters include letters, digits, hyphens (-),
underscores (_), and dots (.). If the file path includes a folder name, the folder must already exist.
Usage guidelines
To replace the running configuration with the configuration in a configuration file without rebooting
the device, use the configuration rollback feature. This feature helps you revert to a previous
configuration state or adapt the running configuration to different network environments.
To ensure a successful rollback, follow these guidelines:
•
Make sure the replacement configuration file is created by using the configuration archive
feature or the save command on the device.
•
If the configuration file is not created on the device, make sure the command lines in the
configuration file are fully compatible with the device.
•
Make sure the replacement configuration file is not encrypted.
Examples
# Replace the running configuration with the configuration in the my_archive_1.cfg configuration
file.
<Sysname> system-view
[Sysname] configuration replace file my_archive_1.cfg
Current configuration will be lost, save current configuration? [Y/N]:n
Now replacing the current configuration. Please wait...
Succeeded in replacing current configuration with the file my_archive_1.cfg.
display archive configuration
Use display archive configuration to display configuration archive information.
Syntax
display archive configuration
Views
Any view
Predefined user roles
network-admin
network-operator
185