Thursday, July 12, 2018

Sonicwall - Export configuration settings using Enterprise Command Line Interface (E-CLI)

Sonicwall TZ firewalls configuration can be exported from command line to a ftp server. Here you can find the Sonicwall related documentation regarding this subject.


export current-config cli ftp ftp://username:password@hostname/filename.txt

export current-config exp ftp ftp://username:password@hostname/filename.exp

This is the full Sonicwall article:

Export configuration settings using Enterprise Command Line Interface (E-CLI)

Last Updated: 5/11/2018 5004 Views 22 Users found this article helpful


Export configuration settings using Enterprise Command Line Interface (E-CLI)


SonicOS 5.9 introduces a new, more robust, enterprise-level Command Line Interface (E-CLI). This article describes how to export configuration settings using E-CLI.

The CLI can be accessed via Serial cable and SSH.

Global System Commands
The following system commands are global and can be executed from anywhere in the config module.



Tab key
Tab key aids in completing a command. Displays useful information such as the next option in the command.
Exit current mode and return to global configuration mode without saving  changes made in the current mode.

The key lists the next command or commands with a short  description of each command. For certain commands, the key even displays examples of using the given command.
Exit current mode without saving changes made in the current mode

q key
The key breaks listing of commands or information. Useful when the output of a command like Show current-config needs to be stopped.
Export system status or configuration

Exit from the mode without saving changes.
Display command help

Reset functions.
Negate a command or set its defaults.

Save configuration changes. The command commit best-effort will save only valid changes
Show system status or configuration.

Diagnostic functions.


To be able to export SonicOS configuration settings via CLI, you require a FTP server to be installed and reachable from the SonicWall. You need to ensure read / write permissions for the FTP folder where the firmware is to be downloaded from or uploaded into.
In the new E-CLI, all commands related to FTP have the FTP URL in the form: ftp://username:password@hostname/filename. In the examples below, the username and password is "test". The IP address of the FTP server is
Export System Command can be used to export configuration settings and pending configuration. Configuration can be exported in two formats: SonicOS and CLI.

SonicOS format exports the settings in the .exp format which can be later imported from the WebUI.
The CLI format export the settings in the E-CLI command format. The exported file can be edited using a text editor.
Login to the CLI using the admin username and password.
Navigate to the config prompt by entering config and press enter. Configuration settings can be exported from either outside the config mode or within it. However, exporting pending configuration requires the user to be be in the config mode. Moreover, pending configuration can only be exported in the CLI format.
Export configuration settings using SonicOS format.

export current-config sonicos ftp ftp://test:test@

Export configuration settings using E-CLI format

export current-config cli ftp ftp://test:test@

Export pending configuration settings using SonicOS format.

export pending-config cli ftp ftp://test:test@

In the screen shot shown above,the FTP server username is SonicWall & password is password.Once we hit enter, it ill start exporting the config files to FTP server as shown below.
Once it finish exporting we will see the config file in the FTP server.

No comments:

Post a Comment