Huawei Switch: saved-configuration vs factory-configuration - 夜莺博客

Huawei Switch: saved-configuration vs factory-configuration

Two Huawei reset commands look interchangeable and are not: reset saved-configuration deletes the startup configuration file but leaves the running configuration alone until you reboot, while reset factory-configuration clears all service configurations and data files and restarts the device automatically. Choosing the wrong one for the scenario is how engineers accidentally wipe a switch they only meant to rehome. This article compares the two commands against the official S5700 documentation and shows exactly when to use each.

reset saved-configuration: Clear the Startup File Only

Use this when the saved startup configuration is damaged, no longer matches the system software, or must not load at the next boot — for example after a botched change that you never want to see again. Execute it in the user view, then reboot manually:

<HUAWEI> reset saved-configuration
Warning: The action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [Y/N]:y
Info: Succeeded in clearing the configuration in the device.
<HUAWEI> reboot
Warning: The configuration has been modified, and it will be saved to the
next startup saved-configuration file flash:/vrpcfg.zip. Continue? [Y/N]:n
System will reboot! Continue? [Y/N]:y

Answering "n" to the save prompt during reboot is the step everyone forgets — if you answer yes, the running configuration is written back to flash and the reset accomplished nothing. This command is the right tool when you still plan to use the current session or when only the boot-time configuration is the problem.

reset factory-configuration: Full One-Click Factory Default

This is the true factory reset. It restores the factory configuration of the system configuration file and clears all service configurations and data files, then reboots the switch by itself:

<HUAWEI> reset factory-configuration
Warning: The command will delete all the configurations and files
(except the startup, patch, module, and license files) from the device.
Continue? [Y/N]:y
Warning: The system will reboot after configurations and files are deleted.
Continue? [Y/N]:y

Note what survives: startup, patch, module and license files are kept, so the switch comes back with its software and licenses intact but zero configuration — exactly what you want before redeploying the device in a new network. On newer software you can confirm the outcome afterwards with display factory-configuration reset-result.

When to Use Which

  • Rehoming or selling a switch → reset factory-configuration for a guaranteed clean slate.
  • Bad startup file after an upgrade → reset saved-configuration, then reboot with a known-good config or reconfigure.
  • Locked out with no CLI access → neither command works from the console; use the BootROM menu (Ctrl+B during boot) for password and configuration recovery, documented in our S5700 BootROM guide.
  • Stacked switches → remove the dedicated stack cables from one end first, otherwise the stack rebuilds after the reset reboots the members.

Before either command, back up with display current-configuration and display startup — after a factory reset there is no undo. Our complete Huawei factory reset guide and the three official methods article cover the surrounding procedures in full.

原文链接:https://support.huawei.com/enterprise/en/doc/EDOC1100088109/c370b76f/restoring-the-factory-settings-of-s5700-switches