Default Configuration and Factory Reset

Table of Contents

Configuration Management

Default Configuration

Reset to Factory Defaults

Configuration Management

Example model & SONiC version:

  • Aurora 830, Aurora 721, Aurora 621
  • Netberg SONiC: sonic-broadcom-202311.n0

Default Configuration

config-setup < backup | boot | factory >

Parameter description:

backup - Take a backup copy of SONiC configuration that need to be migrated over when a new firmware image is installed and booted in to.
boot - Initialize/migrate SONiC configuration during system boot. Users must not execute this command on Linux shell even though it is possible to.
factory - Generates factory default SONiC configuration and save it to /etc/sonic/config_db.json.

factory basics

config-setup factory < keep-basic >

Parameter description:

keep-basic - Preserves basic configurations only.

The basic tables are: MGMT_PORT,MGMT_INTERFACE,PASSW_HARDENING,MGMT_VRF_CONFIG

It can be customized by editing the file: /etc/config-setup/config-setup.conf

Reset to Factory Defaults

reset-factory < keep-all-config | only-config | keep-basic >

Parameter description:

Default - Reset configurations to factory default. Logs and files will be deleted.
keep-all-config - Preserves all configurations after boot. Logs and files will be deleted.
only-config - Reset configurations to factory default. Logs and files will be preserved.
keep-basic - Preserves basic configurations only after boot. Logs and files will be deleted.

Behavior

Delete all non-default users and restore default passwords of default users.

Default

It will generate the default config_db.json file.

It will clear system logs and files.

Keep-basic

It will generate the default config_db.json and merge it with basic configurations from the current “config_db.json”.

It will clear system logs and files.

Keep-all-config

It will keep the same configuration but will clear system logs and files.

Only-config

It will generate the default config_db.json file.

It won’t clear system logs and files.

Usage

admin@sonic:~$ sudo reset-factory keep-all-config
NEWS

Latest news