AMS Command Reference


Table of Contents
Overview

This topic describes tasks and tools related to managing the AMS server.

Overview

Enter AMS commands from the AMS command prompt, Windows command prompt, or Linux or macOS terminal window (depending on which platform AMS is installed).

The ams-server command, when used with the following options, can start the AMS server, manage which configuration file sets the AMS server options, as well as encrypt sensitive data.

OPTIONS

--help

Lists available commands and their descriptions.

--run

Starts the AMS server.

--version

Displays the current AMS version and exits when --run is not also specified.

--conf filename

Use the specified configuration file. Configuration files can be absolute or relative to the current working directory.

--nobackup

When running a new version of the AMS for the first time, the AMS normally makes a backup of the database. Use this option to prevent a backup from being made.

--backup directory

Run the data backup processing (AMS server is shut down once complete). After data upgrade/migration, the backup file AMS-<timestamp>.json is written to the <directory>.

--restore backup file [--forcedelete]

Run the data restore processing (AMS server is shut down once complete). When one or more data sets have existing records, the restore process fails unless the --forcedelete option is specified. After data upgrade/migration, the backup file is read and data set records are restored.

--upgrade

Run the database upgrade/migration only (server is shut down once complete). See Migration and Compatibility for migration information.

--resourcedirectory directory

A directory to add to the Java classpath, so files in this directory can be found as resource files. This option is allowed multiple times, with the order of the directories in the classpath being the order in the command. See Resource Directories for command examples.

-–substitutions name=value,name=value...

A comma separated list of <name>=<value> pairs used to replace substitution variables in the configuration files. Windows: Enclose the entire comma-separated list in double-quotes (for example, --substitutions "username=test,role=Tester").

See Substitution Variable Examples for command examples.

-–substitutionfile filename

A file containing newline terminated name=value pairs used to replace substitution variables in the configuration files. The file must conform to the standard Java properties file format. Substitution variables from the --substitutions option take precedence over substitution variables in the file. See Substitution File Examples for command examples.

--secret create --keystore keystore-path [--keystorepassword pass-phrase]

Creates a master secret and stores it in the KeyStore file. See Encryption Examples for command examples.

--secret encrypt --keystore keystore-path [--keystorepassword pass-phrase][--data clear-text]

Encrypts sensitive data using the master secret in the KeyStore. See Encryption Examples for command examples.

--secret generate --keystore keystore-path [--keystorepassword <pass-phrase>][--mastersecretfile master-secret-file]

Extracts the master secret from the KeyStore and writes it to the file. See Encryption Examples for command examples.

Be aware of Bash and Windows special characters in command options:

Linux/macOS

Options containing Bash special characters ($, *, !, and so on) must be enclosed in single-quotes. Example:

--substitutions username=test,passwd='$example-1!!'
Windows

Options containing Windows special characters (%, !, ^, and so on) are not allowed. Use the --substitutionfile option or omit the option when the command supports prompting of the value.