Docker-specific NuoDB Command Reference
Global Arguments
Argument | Description | Default |
---|---|---|
|
the REST API server to send request to |
|
|
emit HTTP request and response logging; to emit this logging separately from standard output, the file descriptor 5 can be redirected, e.g. |
|
|
show the full JSON response; if several responses are generated by a command, they are output as concatenated JSON |
|
|
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 |
|
|
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>' |
|
|
client basic credentials in the format '<username>:<password>'; this takes precedence over --client-key |
|
|
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 |
|
|
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 |
---|---|---|
|
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 |
|
|
LQuery like syntax to filter the SMs which should participate in the hotcopy request; either |
|
|
if specified, the format for the backup directory used by each SM in this back; format string will be processed by Python’s |
|
|
whether or not the backup root is shared between the SMs taking part in the backup |
|
|
if specified, the amount of time to wait for the backup to complete; if not specified, backup is asynchronous |
|
|
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. |
|
|
the root directory that the backup directory will live inside |
|
|
labels to filter the SMs by that will be participating in the backup, as a space-separated list of the form |
|
|
the type of backup; one of 'full', 'incremental', 'journal' |
(required) |
|
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 |
---|---|---|
|
the name of the database to clear restore requests for |
(required) |
|
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 |
---|---|---|
|
the name of the database whose archive restore to complete |
(required) |
|
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 |
---|---|---|
|
LQuery like syntax to filter the SMs; the information for only the archive IDs served by them will be retrieved; either |
|
|
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 |
|
|
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 |
|
|
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 |
---|---|---|
|
the name of the database to list restore requests for |
(required) |
|
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 |
---|---|---|
|
the name of the database to request restore for |
(required) |
|
the type of restore to request (choices: |
(required) |
|
the user provided data attached to the restore request |
|
|
the IDs of the archives to request restore for |
|
|
labels for processes that serve the archives to request restore for |
|
|
if specified, filter database processes that serve the archives to request restore for |
|
|
archives restore will be performed manually by the user |
restore
Subcommands
restore archive
Restore an archive from a backup location.
nuocmd restore archive [-h] [--archive-type ARCHIVE_TYPE]
[--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 |
---|---|---|
|
specify "lsa" if a restore with an LSA archive should be created |
|
|
the number of seconds to wait for the admin processes to become ready |
|
|
the path to the |
|
|
whether to avoid generating an error if an archive metadata file ( |
|
|
the journal directory for the new archive |
|
|
the directory the archive is restored into |
|
|
the name of the database for the archive being restored |
(required) |
|
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 |
---|---|---|
|
LQuery like syntax to filter the SMs; the information for only the archive IDs served by them will be updated; either |
|
|
the archive IDs of the SMs for which to get the current backup name, specified as a space-separated list of the form |
|
|
the labels to filter SMs for which to get the current backup name, specified as a space-separated list of the form |
|
|
the name of the backup |
(required) |
|
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 |
---|---|---|
|
extra arguments, specified as a space-separated list; if the argument |
|
|
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 |
|
|
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 |
|
|
the JVM arguments to use |
|
|
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) |
|
the port of the admin, which will be injected into its configuration |
(required) |
|
the address of the admin, which will be injected into its configuration |
(required) |
|
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] [--archive-type ARCHIVE_TYPE]
[--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 |
---|---|---|
|
specify "lsa" if an LSA archive should be created |
|
|
the distribution policy to use when selecting the admin that will this TE will connect to |
|
|
if specified, the amount of time to wait for the database to be restored |
|
|
the storage groups that this SM is an observer for, as a space-separated list |
|
|
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 |
|
|
whether to perform strict checking of the supplied arguments against the |
|
|
the directory to restore from |
|
|
the number of seconds to wait for the existing database processes to become ready |
|
|
string containing a space-separated list of tokens in the form |
|
|
the storage groups this SM serves, as a space-separated list |
|
|
if specified, use the specified keystore for the TLS key and certificate of the SM rather than letting the admin generate them automatically |
|
|
whether to advertise the hostname of DNS name of the SM to other processes |
|
|
whether the archive has data; this may be inferred from the |
|
|
string containing a space-separated list of tokens in the form |
|
|
string containing a space-separated list of tokens in the form |
|
|
the number of seconds to wait for the admin processes to become ready |
|
|
the location of the journal |
|
|
the location of the archive |
|
|
the path to the |
|
|
if specified, the expected minor incarnation at the time that the SM is requested |
|
|
if specified, the expected major incarnation at the time that the SM is requested |
|
|
the server ID of the admin that the SM will be connected to |
|
|
the password for the the DBA user |
(required) |
|
the name of the DBA user |
(required) |
|
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 |
---|---|---|
|
the amount of time to wait for all Storage Groups to become available |
|
|
the amount of time to wait for the Kubernetes Service enabling external access to become available |
|
|
if specified, enable external access for SQL clients |
|
|
the distribution policy to use when selecting the admin that will this TE will connect to |
|
|
if specified, the amount of time to wait for the database to be restored |
|
|
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 |
|
|
the number of seconds to wait for the existing database processes to become ready |
|
|
if specified, use the specified keystore for the TLS key and certificate of the TE rather than letting the admin generate them automatically |
|
|
whether to advertise the hostname of DNS name of the TE to other processes and to SQL clients; |
|
|
string containing a space-separated list of tokens in the form |
|
|
string containing a space-separated list of tokens in the form |
|
|
the number of seconds to wait for the database to be created |
|
|
the number of seconds to wait for the admin processes to become ready |
|
|
the path to the |
|
|
if specified, the expected minor incarnation at the time that the TE is requested |
|
|
if specified, the expected major incarnation at the time that the TE is requested |
|
|
the server ID of the admin that the TE will be connected to |
|
|
the name of the database the TE belongs to |
(required) |