To run the Gateway Command-line Utility, open a command shell and type: gwcmd <option>. This example uses the Windows platform:
From here, you can enter any of the command options listed in the table below. This example is of a Gateway backup using the following command: gwcmd -b "C:/Gateway Backups/Backup_190108.gwbk".
When using spaces in a file path name, use quotation marks around the full path name, as shown in the example above. Forward or backward slashes can be used to separate folders. The file path includes the disk name, folder path, and file name.
The above command created a Gateway Backup on the C drive, in the Gateway Backups folder with a file name of Backup_190108.gwbk. The image below shows all the commands used in Steps 2 and 3.
One of the common uses for the Command-Line Utility is to start or stop the Gateway.
Ignition's installation directory contains
stop-ignition.bat, which can start or stop the service. Example:
C:\Program Files\Inductive Automation\Ignition> start-ignition.bat
However, you can also use Windows native service commands to control the running state of the Gateway:
net start ignition
net stop ignition
You can control the service using the
ignition.sh script. It can be called with the
stop parameters to perform the relevant operations.
Additionally, you can use native terminal commands to start or stop the service:
service ignition start
service ignition stop
You can access the service from the install directory using the "ignition.sh" script. On a typical Mac install using the dmg installer, the full command (without a custom location specified) is the following:
The following table lists all available 'gwcmd' options.
|Creates an |
Downloads a Gateway backup
Clears the gateway's SSL / TLS setup. The gateway's SSL / TLS connector will be immediately shut down.
|Use with the |
Exports the gateway's SSL KeyStore in PKCS #12 format and saves to the specified path.
Exports the private key from the gateway's SSL KeyStore in PEM format and saves to the specified path.
Reloads the Gateway's SSL KeyStore from disk. Any update to the KeyStore will be automatically applied to any new connections.
|Shows the usage for this command.|
|Retrieves server status and port information from the Gateway if it is running.|
|Changes the Gateway http port.|
|Changes the Gateway https port.|
Use with the --restore flag to skip contacting a running gateway and stage the restore file directly.
Add to the export private key command to not encrypt the private key.
Specifies a Gateway name while restoring a backup. Additionally, the
|Enables a password reset command, which will allow you to create a temporary user that can access the gateway again. Requires a gateway restart to take effect. See Gateway Password Reset below.|
|Restarts the Gateway.|
Restores from a Gateway backup, using the file specified at the path.
|Performs a thread dump in the Gateway and prints the dump to the command-line.|
|Creates an |
|Applies a |
Number of seconds to wait for a backup to be generated. Starting in 8.1.17, the default timeout value is 60 seconds. In older versions, the default timeout value is 30 seconds.