Page MenuHomeVyOS Platform

Factory-reset/default command
Open, NormalPublicFEATURE REQUEST

Description

hi team ,

I was thinking to add a useful command that allows resetting all running configuration and just leave the basic initial config that keeps hw-id, interfaces numbering , etc .

Juniper /Cisco/others vendors has this type of command that it also can integrate with api .

https://www.juniper.net/documentation/us/en/software/junos/cli/topics/topic-map/junos-factory-default.html
https://docs.fortinet.com/document/fortigate/7.0.0/administration-guide/702257/configuration-backups

Restore factory defaults

There may be a need to reset the FortiGate to its original defaults; for example, to begin with a fresh configuration. There are two options when restoring factory defaults. The first resets the entire device to the original out-of-the-box configuration.

You can reset the device with the following CLI command:

execute factoryreset

I think that we can make a restored this initial config ,after the fresh installation .

Details

Difficulty level
Unknown (require assessment)
Version
vyos-1.4-rolling
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)

Event Timeline

fernando triaged this task as Normal priority.Oct 31 2022, 8:32 PM
fernando created this task.
fernando created this object in space S1 VyOS Public.
Viacheslav changed the subtype of this task from "Task" to "Feature Request".Nov 1 2022, 9:02 AM
Viacheslav added a subscriber: Viacheslav.

In addition to the configuration, you also need to reset all logs/custom scripts and boot from the base image.
What will be if you have several images? Should we delete all other images?
What will be if you have container images? Should we delete them?
And there are many other nuances.

Maybe a simplified and interactive cli, as when adding new image? So user can decide what to do with other images and containers.

normally, when I want to make an empty-base config, I save config.boot another place. So I load it when I need to restart the configuration. I was thinking that we can make something like it by cli, it should be saved in the first config.boot file and restored.

for example, Fortinet has other levels of factory-resets that only removed running configuration (it keeps all metadata, ssh-keys, even mgmt ip-address/api token) ,of course it doesn't look something easy to create, but super useful when you are working/testing configuration.