TrueNAS SCALETrueNAS SCALE Nightly Development Documentation
This content follows experimental early release software. Use the Product and Version selectors above to view content specific to a stable software release.

Update

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!

Welcome to the TrueNAS SCALE Command Line Interface (CLI) guide!

The TrueNAS CLI in TrueNAS SCALE functions like a text-based version of the web UI with many functional areas grouped into parent and child namespaces that mirror the counterparts in the SCALE UI.

The underlying structure of the CLI namespaces and commands closely follows that of the SCALE API. For more information on API commands, arguments, options, and definitions go to API Keys and click on API Docs in the SCALE UI.

The update namespace allows users to locate pending updates or available trains and to update the TrueNAS SCALE release using the CLI.

Update Commands

The update namespace has 10 commands and is based on functions found in the SCALE API and web UI.

You can enter commands from the main CLI prompt or from the update namespace prompt.

Check_Available Command

Use the check_available command to see if updates are available for the release train specified. Use the get_trains command to see the current and selected train dictionary for the system.

The TrueNAS CLI guide for SCALE is a work in progress! This command has not been fully tested and validated. Full documentation is still being developed. Check back for updated information.

Download Command

The download command downloads the updates for the selected train.

Using the Download Command

Description

The download command does not require entering a property or argument Enter the command, then press Enter. The command begins downloading any updates from the current train and shows the status in percentage downloaded. If an update is not available the system displays an error, then the CLI prompt.

Usage

From the command prompt, enter:

system update download

Command Example
system update download
[0%]...
[0%] Retrieving update manifest...

File Command

The file command updates the system using an uploaded file.

The TrueNAS CLI guide for SCALE is a work in progress! This command has not been fully tested and validated. Full documentation is still being developed. Check back for updated information.

Get_Auto_Download Command

The get_auto_download command returns the status of the auto download function is enabled.

Using the Get_Auto_Download Command

Description

The get_auto_download command does not require entering a property or argument. Enter the command, then Enter. The command returns true if auto download is enabled, false if not.

Usage

From the command prompt, enter:

system update get_auto_download

Command Example
system update get_auto_download
true

Get_Pending Command

The get_pending command returns a table with a list of packages already downloaded and ready to apply.

The TrueNAS CLI guide for SCALE is a work in progress! This command has not been fully tested and validated. Full documentation is still being developed. Check back for updated information.
Using the Get_Pending Command

Description

The get_pending command has one optional property, path. Enter a property argument using = to separate property and value. Enter the command or command string, then press Enter. The command returns a table listing the operation, old and new upgrade packages (files).

Usage

From the command prompt, enter:

system update get_pending

Command Example
system update get_pending
+-----------+--------+--------+
| operation | old    | new    |
+-----------+--------+--------+
| upgrade   | <dict> | <dict> |
+-----------+--------+--------+

Get_Trains Command

The get_trains command shows the available trains dictionary, the currently configured train and the train of the current boot environment on the system.

Use before entering the check_available and set_train commands.

Using the Get_Trains Command

Description

The `get_trains command does not require entering properties or arguments. Enter the command, then press Enter. The command returns a table with the trains dictionary, currently configured train, and selected train of the current boot environment on the system.

Usage

From the command prompt, enter:

system update get_trains

Command Example
system update get_trains 
+----------|--------------------------|
|   trains | <dict>                   |
|  current | TrueNAS-SCALE-Cobia-BETA |
| selected | TrueNAS-SCALE-Cobia-BETA |
+----------|--------------------------|

Manual Command

The manual command updates the system using a manual update file downloaded from the SCALE release train and uploaded to the system using a file transfer program.

The TrueNAS CLI guide for SCALE is a work in progress! This command has not been fully tested and validated. Full documentation is still being developed. Check back for updated information.

Performing Manual Updates

To perform a manual update via the TrueNAS CLI, you must first upload a manual update file onto the system.

Connect to your system with your choice of FTP program (such as WinSCP) and place the manual update file in /var/tmp/firmware.

After it finishes uploading, go to System Settings > Shell and enter cli at the prompt if the system shell is set to a shell other than TrueNAS CLI for the admin user. From the SCALE CLI, enter:

system update manual path=/var/tmp/firmware/updatefilename

Where updatefilename is the name of the update file.

Set_Auto_Download Command

The set_auto_download command sets the update to auto-download update files.

Using the Set_Auto_Download Command

Description

The set_auto_download command has one required property, autocheck. Enter property arguments using = to separate property and value. Enter the command string, then Enter. The command returns an empty line.

Usage

From the command prompt, enter:

system update set_auto_download autocheck=true

Where true sets the system to automatically download update files from the current train, or false does not set the system to automatically download update files.

Command Example
system update set_auto_download autocheck=true

Set_Train Command

The set_train command sets an update train to use by default for updates. Use to change the current train to another available train.

The TrueNAS CLI guide for SCALE is a work in progress! This command has not been fully tested and validated. Full documentation is still being developed. Check back for updated information.

Update Command

The update command downloads an update, if not already in the cache, and then applies it.

Using the Update Command

Description

The update command does not require entering a property or argument. Enter the command, then press Enter. The system begins the download and upgrade process. If an update is not available the screen shows an error, aborts the process, and returns to the CLI prompt.

Usage

From the command prompt, enter:

system update update

Command Example
system update update
[0%]
[0%] Retrieving update manifest...