In juniper devices, there is an option to load our configuration back to the factory default state. The use of 'load factory-default' command in configuration mode hierarchy reverts our device to the factory default state. You can also use the load factory-default command to revert to the factory-default configuration file that contains all default settings except the root password setting, which is retained.
If a configuration fails or denies management access to the services gateway, you can use the RESET CONFIG button to restore the services gateway to the factory default configuration or a rescue configuration. For example, if someone inadvertently commits a configuration that denies management access to a services gateway, you can delete the invalid configuration and replace it with a rescue configuration by pressing the RESET CONFIG button. The button is recessed to prevent it from being pressed accidentally.
The rescue configuration is a previously committed, valid configuration. You must have previously set the rescue configuration through the J-Web interface or the CLI.