TrueNAS SCALETrueNAS SCALE Version Documentation
This content follows the TrueNAS SCALE 23.10 (Cobia) releases. Use the Product and Version selectors above to view content specific to different TrueNAS software or major version.

Config

  4 minute read.

Last Modified 2024-03-19 08:38 EDT

The SCALE CLI guide is a work in progress! New namespace and command documentation is continually added and maintained, so check back here often to see what is new!

Config Namespace

The config namespace has three commands and is based on configuration management functions found in the SCALE API and web UI. It provides access to configuration management methods through the config namespace commands.

Config Commands

The following config namespace commands allow you to save or upload system configuration files and to reset configuration to default. You can enter commands from the main CLI prompt or from the system namespace prompt.

Reset Command

The reset command reverts the system database to default configuration values.

Download the current system configuration with save before resetting the configuration to default settings! If you do not save the system configuration before resetting it, you could lose data that was not backed up, and you cannot revert to the previous configuration.

The reset command can result in unexpected behavior if entered via Shell in the web UI, especially if reboot is set to false. To avoid instability, only use reset via a direct connection to the console or SSH.
TrueNAS Enterprise

Enterprise High Availability (HA) systems should never reset their system configuration to defaults. Contact iXsystems Support if a system configuration reset is required.

Customers who purchase iXsystems hardware or that want additional support must have a support contract to use iXsystems Support Services. The TrueNAS Community forums provides free support for users without an iXsystems Support contract.

iXsystems Customer Support
Support Portalhttps://support.ixsystems.com
Emailsupport@ixsystems.com
Telephone and Other Resourceshttps://www.ixsystems.com/support/

Description

The reset command has one optional property,options, which has one additional optional property, reboot. If not specified, reboot defaults to true. Enter the reboot property argument enclosed within {} curly brackets following the options property: options={"reboot":true}. When reboot is true, the system reboots ten seconds after the job is completed.

Enter the command string then press Enter. After entering the command correctly, the job begins and progress displays.

Usage

From the CLI prompt, enter:

system config reset

system config reset 
[0%] ...
[5%] Removing cluster information (if any)...
[15%] Replacing database file...
[25%] Running database upload hooks...
[50%] Updating initramfs...
[95%] Will reboot in 10 seconds...
[100%] Will reboot in 10 seconds...

Save Command

The save command creates a tar file of security-sensitive configuration information and saves it to the specified location.

The configuration file contains sensitive data like system passwords. Keep the configuration file safe and protect it from unauthorized access!

Description

save has one optional property, configsave, which has four additional optional properties (see table below). Enclose array properties in {} curly brackets, with the property double-quoted and separated from the boolean value using the : delimiter. Separate multiple array property arguments within the {} with a comma.

Enter the desired file name and path following a > carrot. Save the config file to a secure location that is accessible, such as an SMB share.

Enter the command string then press Enter. After entering the command correctly, the cli displays the status of the job then confirms the output file is saved at the specified location.

PropertyRequiredDescriptionSyntax Example
secretseednoWhen true, the file includes the password secret seed. Including the password secret seed allows using this configuration file with a new boot device. This also decrypts all system passwords for reuse when the configuration file is uploaded."secretseed":true
pool_keysn/apool_keys is ignored and depricated on TrueNAS SCALE systems.n/a
root_authorized_keysnoWhen true, the configuration file includes the “/root/.ssh/authorized_keys” file for the root user."root_authorized_keys":true
gluster_confignoWhen true, the configuration file includes the directory that stores gluster configuration files."gluster_config":true

Usage

From the CLI prompt, enter:

system config save > /mnt/tank/test/FILENAME.tar

Where /mnt/tank/test/FILENAME.tar is the desired file name and save path.

system config save configsave={"secretseed":true,"root_authorized_keys":true,"gluster_config":true} > /mnt/tank/test/FILENAME.tar
[0%] ...
[100%] ...
[100%] Job output (786432 bytes) saved at '/mnt/tank/test/FILENAME.tar'

Upload Command

Do not use. Use the web UI to upload configuration files.

Related CLI System Articles

Related Backup Articles