S5700 系列交换机恢复出厂配置 – 华为 (huawei.com)
1、长按PNP键恢复出厂配置
对于支持PNP键的设备,用户可通过长按(6秒以上)PNP键,使设备恢复出厂配置并自动重新启动。PNP键如下图所示。

2、一键式恢复出厂配置
在用户视图下,执行命令reset factory-configuration。
3、通过清空配置文件来恢复出厂配置
前提是有保存的配置文件
1、在用户视图下,执行命令reset saved-configuration。
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
Warning: Now clearing the configuration in the device.
Feb 4 2024 15:27:16-08:00 sw1 %%01CFM/4/RST_CFG(l)[0]:The user chose Y when dec
iding whether to reset the saved configuration.
Info: Succeeded in clearing the configuration in the device.
2、在用户视图下,执行命令reboot,重新启动设备。
reboot
reboot
Info: The system is now comparing the configuration, please wait.
Warning: All the configuration will be saved to the configuration file for the n
ext startup:, Continue?[Y/N]:N
Info: If want to reboot with saving diagnostic information, input ‘N’ and then e
xecute ‘reboot save diagnostic-information’.
System will reboot! Continue?[Y/N]:Y