Docker-specific NuoDB Command Reference

Global Arguments

Argument Description Default

--api-server

the REST API server to send request to

$NUOCMD_API_SERVER / localhost:8888

--show-http

emit HTTP request and response logging; to emit this logging separately from standard output, the file descriptor 5 can be redirected, e.g. nuocmd --show-http show domain 5>/tmp/http-logging

--show-json

show the full JSON response; if several responses are generated by a command, they are output as concatenated JSON

--show-json-fields

show the specified fields of the JSON response; multiple fields can be specified as a comma-separated list, and nested fields can be specified using the syntax <parent>.<child>; if several responses are generated by a command, they are output as concatenated JSON

--client-key

client key-pair if server requires client authentication (see 'needClientAuth' REST setting); specified as a single file containing both certificate and private key, or as '<certificate>,<private key>'

$NUOCMD_CLIENT_KEY

--basic-creds

client basic credentials in the format '<username>:<password>'; this takes precedence over --client-key

$NUOCMD_BASIC_CREDS

--verify-server

trusted certificate used to verify the server when using HTTPS; if no argument is specified then the default set of trusted CA certificates for the system is used

$NUOCMD_VERIFY_SERVER

--no-verify

if specified, then server verification is disabled; this takes precedence over --verify-server

backup Subcommands

backup database

A command to help running hot copies in a container-style environment. It works as follows:

1) Find all SMs that are running with the labels specified by 'labels'. All labels have to match as opposed to any

2) Figure out name of the backup. Conceptually the path to a backup set is {backup_root}/{backup_name}. Unless specified, the backup_root always stays the same. If the user provides a 'backup_name' that is used. If not, the behavior depends on the backup type. If a full, a new backup_name will be generated based on the current datetime. If an incremental or journal the kv-store will be checked to see if there is a backup_name stored for the given archive id. If not an error is thrown. The value stored in the kv-store is updated whenever a full is taken.

3) Determine the full backup path. If neither --shared nor a custom format are provided, this path will just be {backup_root}/{backup_name} using the name found in step two. If --shared is provided or a custom format is provided, the backup_name for each archive id may be modified. For example, by default each archive in a shared backup use the path {backup_root}/{backup_name}-{archive_id}

4) Issue the actual hot copy request. Now that we have calculated a mapping from archive id to backup path we can use the existing hot copy tooling to issue the hot copy request

nuocmd backup database [-h] [--partial-storage-groups]
                       [--process-filter PROCESS_FILTER]
                       [--format FORMAT] [--shared] [--timeout TIMEOUT]
                       [--backup-name BACKUP_NAME]
                       [--backup-root BACKUP_ROOT] [--labels LABELS]
                       --type TYPE --db-name DB_NAME
Argument Description Default

--partial-storage-groups

hot copy an archive set that does not include all the storage groups defined in the database; restoring from such a backup could cause data loss or inconsistent data; by default all database storage groups must be included

--process-filter

LQuery like syntax to filter the SMs which should participate in the hotcopy request; either --labels or --process-filter can be specified

--format

if specified, the format for the backup directory used by each SM in this back; format string will be processed by Python’s str.format() function and values {archive_id} and {backup_name} will be substituted

--shared

whether or not the backup root is shared between the SMs taking part in the backup

--timeout

if specified, the amount of time to wait for the backup to complete; if not specified, backup is asynchronous

--backup-name

the name of the backup directory; if not specified and the type is 'full' a new backup name is generated; if not specified and the type is something other than 'full', the name of the last full backup is used.

--backup-root

the root directory that the backup directory will live inside

--labels

labels to filter the SMs by that will be participating in the backup, as a space-separated list of the form <key> <value>

--type

the type of backup; one of 'full', 'incremental', 'journal'

(required)

--db-name

the name of the database to backup

(required)

clear Subcommands

clear restore-requests

clear all restore requests for selected database

nuocmd clear restore-requests [-h] --db-name DB_NAME
                              [--coordinator-only]
Argument Description Default

--db-name

the name of the database to clear restore requests for

(required)

--coordinator-only

clear only the database restore coordinator lock

complete Subcommands

complete restore

completes restore request for database archives and removes them from the domain state

nuocmd complete restore [-h] --db-name DB_NAME
                        [--archive-ids ARCHIVE_IDS [ARCHIVE_IDS ...]]
Argument Description Default

--db-name

the name of the database whose archive restore to complete

(required)

--archive-ids

the IDs of the archives to complete restore requests for

get Subcommands

get current-backup

Get the current backup stored in the KV-store for the database.

nuocmd get current-backup [-h] [--process-filter PROCESS_FILTER]
                          [--archive-ids ARCHIVE_IDS] [--labels LABELS]
                          --db-name DB_NAME
Argument Description Default

--process-filter

LQuery like syntax to filter the SMs; the information for only the archive IDs served by them will be retrieved; either --labels or --process-filter or --archive_ids can be specified

--archive-ids

the archive IDs of the SMs for which to update the current backup name in the KV-store, specified as a space-separated list of the form <archive ID> <archive ID> …​

--labels

the labels to filter SMs for which to update the current backup name in the KV-store, specified as a space-separated list of the form <key> <value>

--db-name

the name of the database for which the current backup is set

(required)

get restore-requests

list restore requests for a database or an archive

nuocmd get restore-requests [-h] --db-name DB_NAME
                            [--archive-ids ARCHIVE_IDS [ARCHIVE_IDS ...]]
Argument Description Default

--db-name

the name of the database to list restore requests for

(required)

--archive-ids

the IDs of the archives to list request restore for

request Subcommands

request restore

request a restore for a database or an archive

nuocmd request restore [-h] --db-name DB_NAME --type {database,archive}
                       [--user-data USER_DATA]
                       [--archive-ids ARCHIVE_IDS [ARCHIVE_IDS ...] |
                       --labels [LABELS [LABELS ...]] |
                       --process-filter PROCESS_FILTER] [--manual]
Argument Description Default

--db-name

the name of the database to request restore for

(required)

--type

the type of restore to request (choices: database, archive)

(required)

--user-data

the user provided data attached to the restore request

--archive-ids

the IDs of the archives to request restore for

--labels

labels for processes that serve the archives to request restore for

--process-filter

if specified, filter database processes that serve the archives to request restore for

--manual

archives restore will be performed manually by the user

restore Subcommands

restore archive

Restore an archive from a backup location.

nuocmd restore archive [-h]
                       [--servers-ready-timeout SERVERS_READY_TIMEOUT]
                       [--nuoarchive-bin NUOARCHIVE_BIN]
                       [--clean-metadata] [--journal-dir JOURNAL_DIR]
                       [--restore-dir RESTORE_DIR] --db-name DB_NAME
                       --origin-dir ORIGIN_DIR
Argument Description Default

--servers-ready-timeout

the number of seconds to wait for the admin processes to become ready

10

--nuoarchive-bin

the path to the nuoarchive binary

/opt/nuodb/bin/nuoarchive

--clean-metadata

whether to avoid generating an error if an archive metadata file (info.json) is found in --origin-dir

--journal-dir

the journal directory for the new archive

--restore-dir

the directory the archive is restored into

/var/opt/nuodb/archive

--db-name

the name of the database for the archive being restored

(required)

--origin-dir

the directory containing the backup to restore

(required)

set Subcommands

set current-backup

Update the current backup stored for certain archive ids. If archive_ids is specified, just use the list of archive_ids. If labels are specified, use the list of archive ids that match all specified labels. If neither are provided update every archive in the database

nuocmd set current-backup [-h] [--process-filter PROCESS_FILTER]
                          [--archive-ids ARCHIVE_IDS] [--labels LABELS]
                          --backup-name BACKUP_NAME --db-name DB_NAME
Argument Description Default

--process-filter

LQuery like syntax to filter the SMs; the information for only the archive IDs served by them will be updated; either --labels or --process-filter or --archive_ids can be specified

--archive-ids

the archive IDs of the SMs for which to get the current backup name, specified as a space-separated list of the form <archive ID> <archive ID> …​`

--labels

the labels to filter SMs for which to get the current backup name, specified as a space-separated list of the form <key> <value>

--backup-name

the name of the backup

(required)

--db-name

the name of the database for which the current backup is set

(required)

start Subcommands

start admin

Start a containerized Admin Process.

nuocmd start admin [-h] [--args ARGS] [--conf-dir CONF_DIR]
                   [--bootstrap-server-id BOOTSTRAP_SERVER_ID]
                   [--java-opts JAVA_OPTS] --domain-entrypoint
                   DOMAIN_ENTRYPOINT --admin-port ADMIN_PORT
                   --alt-address ALT_ADDRESS --server-id SERVER_ID
Argument Description Default

--args

extra arguments, specified as a space-separated list; if the argument -- appears, all subsequent arguments are assumed to be nuoadmin.conf overrides of the form <key>=<value>

--conf-dir

the directory to generate nuoadmin.conf into; if unspecified, either the NUODOCKER_CONF_DIR or NUODB_CFGDIR environment variable is used to determine the directory for the nuoadmin.conf file, with precedence given to NUODOCKER_CONF_DIR

--bootstrap-server-id

space-separated list of server IDs that should be part of the initial membership; all servers are assumed to have addresses that are identical to their server IDs

--java-opts

the JVM arguments to use

--domain-entrypoint

the address and port through which this admin should enter the domain; this can be the admin’s own address, if it is the initial server

(required)

--admin-port

the port of the admin, which will be injected into its configuration

(required)

--alt-address

the address of the admin, which will be injected into its configuration

(required)

--server-id

the server ID of the admin, which will be injected into its configuration

(required)

start sm

Start a containerized Storage Manager.

nuocmd start sm [-h]
                [--admin-distribution-policy ADMIN_DISTRIBUTION_POLICY]
                [--database-restore-timeout DATABASE_RESTORE_TIMEOUT]
                [--storage-group-observers STORAGE_GROUP_OBSERVERS]
                [--no-thread-dump] [--strict]
                [--restore-from-dir RESTORE_FROM_DIR]
                [--processes-ready-timeout PROCESSES_READY_TIMEOUT]
                [--database-options DATABASE_OPTIONS]
                [--storage-groups STORAGE_GROUPS] [--keystore KEYSTORE]
                [--resolve-address] [--restored] [--options OPTIONS]
                [--labels LABELS]
                [--servers-ready-timeout SERVERS_READY_TIMEOUT]
                [--journal-dir JOURNAL_DIR] [--archive-dir ARCHIVE_DIR]
                [--nuodb-bin NUODB_BIN]
                [--incarnation-minor INCARNATION_MINOR]
                [--incarnation-major INCARNATION_MAJOR]
                [--server-id SERVER_ID] --dba-password DBA_PASSWORD
                --dba-user DBA_USER --db-name DB_NAME
Argument Description Default

--admin-distribution-policy

the distribution policy to use when selecting the admin that will this TE will connect to

least_connections

--database-restore-timeout

if specified, the amount of time to wait for the database to be restored

--storage-group-observers

the storage groups that this SM is an observer for, as a space-separated list

--no-thread-dump

whether to suppress dumping of stacktraces if a core file is detected when exiting; by default, stacktraces are dumped to the container’s standard output

--strict

whether to perform strict checking of the supplied arguments against the info.json containing the archive metadata

--restore-from-dir

the directory to restore from

--processes-ready-timeout

the number of seconds to wait for the existing database processes to become ready

10

--database-options

string containing a space-separated list of tokens in the form <key> <value> specifying the database options

--storage-groups

the storage groups this SM serves, as a space-separated list

--keystore

if specified, use the specified keystore for the TLS key and certificate of the SM rather than letting the admin generate them automatically

--resolve-address

whether to advertise the hostname of DNS name of the SM to other processes

--restored

whether the archive has data; this may be inferred from the info.json file even if --restored is not explicitly specified

--options

string containing a space-separated list of tokens in the form <key> <value> specifying the process options

--labels

string containing a space-separated list of tokens in the form <key> <value> specifying the process labels

--servers-ready-timeout

the number of seconds to wait for the admin processes to become ready

10

--journal-dir

the location of the journal

--archive-dir

the location of the archive

/var/opt/nuodb/archive

--nuodb-bin

the path to the nuodb binary

/opt/nuodb/bin/nuodb

--incarnation-minor

if specified, the expected minor incarnation at the time that the SM is requested

--incarnation-major

if specified, the expected major incarnation at the time that the SM is requested

--server-id

the server ID of the admin that the SM will be connected to

--dba-password

the password for the the DBA user

(required)

--dba-user

the name of the DBA user

(required)

--db-name

the name of the database the SM belongs to

(required)

start te

Start a containerized Transaction Engine.

nuocmd start te [-h] [--sg-ready-timeout SG_READY_TIMEOUT]
                [--external-access-timeout EXTERNAL_ACCESS_TIMEOUT]
                [--enable-external-access]
                [--admin-distribution-policy ADMIN_DISTRIBUTION_POLICY]
                [--database-restore-timeout DATABASE_RESTORE_TIMEOUT]
                [--no-thread-dump]
                [--processes-ready-timeout PROCESSES_READY_TIMEOUT]
                [--keystore KEYSTORE] [--resolve-address]
                [--labels LABELS] [--options OPTIONS]
                [--database-created-timeout DATABASE_CREATED_TIMEOUT]
                [--servers-ready-timeout SERVERS_READY_TIMEOUT]
                [--nuodb-bin NUODB_BIN]
                [--incarnation-minor INCARNATION_MINOR]
                [--incarnation-major INCARNATION_MAJOR]
                [--server-id SERVER_ID] --db-name DB_NAME
Argument Description Default

--sg-ready-timeout

the amount of time to wait for all Storage Groups to become available

30

--external-access-timeout

the amount of time to wait for the Kubernetes Service enabling external access to become available

120

--enable-external-access

if specified, enable external access for SQL clients

--admin-distribution-policy

the distribution policy to use when selecting the admin that will this TE will connect to

least_connections

--database-restore-timeout

if specified, the amount of time to wait for the database to be restored

--no-thread-dump

whether to suppress dumping of stacktraces if a core file is detected when exiting; by default, stacktraces are dumped to the container’s standard output

--processes-ready-timeout

the number of seconds to wait for the existing database processes to become ready

10

--keystore

if specified, use the specified keystore for the TLS key and certificate of the TE rather than letting the admin generate them automatically

--resolve-address

whether to advertise the hostname of DNS name of the TE to other processes and to SQL clients; --enable-external-access takes precedence when choosing the address advertised to SQL clients

--labels

string containing a space-separated list of tokens in the form <key> <value> specifying the process labels

--options

string containing a space-separated list of tokens in the form <key> <value> specifying the process options

--database-created-timeout

the number of seconds to wait for the database to be created

10

--servers-ready-timeout

the number of seconds to wait for the admin processes to become ready

10

--nuodb-bin

the path to the nuodb binary

/opt/nuodb/bin/nuodb

--incarnation-minor

if specified, the expected minor incarnation at the time that the TE is requested

--incarnation-major

if specified, the expected major incarnation at the time that the TE is requested

--server-id

the server ID of the admin that the TE will be connected to

--db-name

the name of the database the TE belongs to

(required)