Database Service command-line clientThe trove client is the command-line interface
(CLI) for the Database API and its extensions. This chapter documents
trove version 1.0.6.
For help on a specific trove
command, enter:
$troveCOMMANDtrove usageusage: trove [--version] [--debug] [--os-username <auth-user-name>]
[--os-password <auth-password>]
[--os-tenant-name <auth-tenant-name>]
[--os-tenant-id <auth-tenant-id>] [--os-auth-url <auth-url>]
[--os-region-name <region-name>] [--service-type <service-type>]
[--service-name <service-name>] [--bypass-url <bypass-url>]
[--database-service-name <database-service-name>]
[--endpoint-type <endpoint-type>]
[--os-database-api-version <database-api-ver>]
[--os-cacert <ca-certificate>] [--retries <retries>] [--json]
<subcommand> ...Subcommandsbackup-copy
Creates a backup from another backup.
backup-create
Creates a backup of an instance.
backup-delete
Deletes a backup.
backup-list
Lists available backups.
backup-list-instance
Lists available backups for an instance.
backup-show
Shows details of a backup.
configuration-attach
Attaches a configuration group to an
instance.
configuration-create
Creates a configuration group.
configuration-default
Shows the default configuration of an
instance.
configuration-delete
Deletes a configuration group.
configuration-detach
Detaches a configuration group from an
instance.
configuration-instances
Lists all instances associated with a
configuration group.
configuration-list
Lists all configuration groups.
configuration-parameter-list
Lists available parameters for a
configuration group.
configuration-parameter-show
Shows details of a configuration parameter.
configuration-patch
Patches a configuration group.
configuration-show
Shows details of a configuration group.
configuration-update
Updates a configuration group.
create
Creates a new instance.
database-create
Creates a database on an instance.
database-delete
Deletes a database from an instance.
database-list
Lists available databases on an instance.
datastore-list
Lists available datastores.
datastore-show
Shows details of a datastore.
datastore-version-list
Lists available versions for a datastore.
datastore-version-show
Shows details of a datastore version.
delete
Deletes an instance.
detach-replica
Detaches a replica instance from its
replication source.
flavor-list
Lists available flavors.
flavor-show
Shows details of a flavor.
limit-list
Lists the limits for a tenant.
list
Lists all the instances.
metadata-create
Creates metadata in the database for
instance <id>.
metadata-delete
Deletes metadata for instance <id>.
metadata-edit
Replaces metadata value with a new one, this
is non-destructive.
metadata-list
Shows all metadata for instance <id>.
metadata-show
Shows metadata entry for key <key> and
instance <id>.
metadata-update
Updates metadata, this is destructive.
resize-flavor
[DEPRECATED] Please use resize-instance
instead.
resize-instance
Resizes an instance with a new flavor.
resize-volume
Resizes the volume size of an instance.
restart
Restarts an instance.
root-enable
Enables root for an instance and resets if
already exists.
root-show
Gets status if root was ever enabled for an
instance.
secgroup-add-rule
Creates a security group rule.
secgroup-delete-rule
Deletes a security group rule.
secgroup-list
Lists all security groups.
secgroup-list-rules
Lists all rules for a security group.
secgroup-show
Shows details of a security group.
show
Shows details of an instance.
update
Updates an instance: Edits name,
configuration, or replica source.
user-create
Creates a user on an instance.
user-delete
Deletes a user from an instance.
user-grant-access
Grants access to a database(s) for a user.
user-list
Lists the users for an instance.
user-revoke-access
Revokes access to a database for a user.
user-show
Shows details of a user of an instance.
user-show-access
Shows access details of a user of an
instance.
user-update-attributes
Updates a user's attributes on an instance.
bash-completion
Prints arguments for bash_completion.
help
Displays help about this program or one of
its subcommands.
trove optional arguments--version
show program's version number and exit
--debug
Print debugging output.
--os-username <auth-user-name>
Defaults to env[OS_USERNAME].
--os-password <auth-password>
Defaults to env[OS_PASSWORD].
--os-tenant-name <auth-tenant-name>
Defaults to env[OS_TENANT_NAME].
--os-tenant-id <auth-tenant-id>
Defaults to env[OS_TENANT_ID].
--os-auth-url <auth-url>
Defaults to env[OS_AUTH_URL].
--os-region-name <region-name>
Defaults to env[OS_REGION_NAME].
--service-type <service-type>
Defaults to database for most actions.
--service-name <service-name>
Defaults to env[TROVE_SERVICE_NAME].
--bypass-url <bypass-url>
Defaults to env[TROVE_BYPASS_URL].
--database-service-name <database-service-name>
Defaults to
env[TROVE_DATABASE_SERVICE_NAME].
--endpoint-type <endpoint-type>
Defaults to env[TROVE_ENDPOINT_TYPE] or
publicURL.
--os-database-api-version <database-api-ver>
Accepts 1, defaults to
env[OS_DATABASE_API_VERSION].
--os-cacert <ca-certificate>
Specify a CA bundle file to use in verifying
a TLS (https) server certificate. Defaults
to env[OS_CACERT].
--retries <retries>
Number of retries.
--json, --os-json-output
Output JSON instead of prettyprint. Defaults
to env[OS_JSON_OUTPUT].
trove backup-copy commandusage: trove backup-copy <name> <backup>
[--region <region>] [--description <description>]
Creates a backup from another backup.
Positional arguments<name>
Name of the backup.
<backup>
Backup ID of the source backup.
Optional arguments--region <region>
Region where the source backup resides.
--description <description>
An optional description for the backup.
trove backup-create commandusage: trove backup-create <instance> <name>
[--description <description>] [--parent <parent>]
Creates a backup of an instance.
Positional arguments<instance>
ID of the instance.
<name>
Name of the backup.
Optional arguments--description <description>
An optional description for the backup.
--parent <parent>
Optional ID of the parent backup to perform an
incremental backup from.
trove backup-delete commandusage: trove backup-delete <backup>
Deletes a backup.
Positional arguments<backup>
ID of the backup.
trove backup-list commandusage: trove backup-list [--limit <limit>] [--datastore <datastore>]
Lists available backups.
Optional arguments--limit <limit>
Return up to N number of the most recent backups.
--datastore <datastore>
Name or ID of the datastore to list backups for.
trove backup-list-instance commandusage: trove backup-list-instance [--limit <limit>] <instance>
Lists available backups for an instance.
Positional arguments<instance>
ID of the instance.
Optional arguments--limit <limit>
Return up to N number of the most recent backups.
trove backup-show commandusage: trove backup-show <backup>
Shows details of a backup.
Positional arguments<backup>
ID of the backup.
trove configuration-attach commandusage: trove configuration-attach <instance> <configuration>
Attaches a configuration group to an instance.
Positional arguments<instance>
ID of the instance.
<configuration>
ID of the configuration group to attach to the instance.
trove configuration-create commandusage: trove configuration-create <name> <values>
[--datastore <datastore>]
[--datastore_version <datastore_version>]
[--description <description>]
Creates a configuration group.
Positional arguments<name>
Name of the configuration group.
<values>
Dictionary of the values to set.
Optional arguments--datastore <datastore>
Datastore assigned to the configuration
group.
--datastore_version <datastore_version>
Datastore version ID assigned to the
configuration group.
--description <description>
An optional description for the
configuration group.
trove configuration-default commandusage: trove configuration-default <instance>
Shows the default configuration of an instance.
Positional arguments<instance>
ID of the instance.
trove configuration-delete commandusage: trove configuration-delete <configuration_group>
Deletes a configuration group.
Positional arguments<configuration_group>
ID of the configuration group.
trove configuration-detach commandusage: trove configuration-detach <instance>
Detaches a configuration group from an instance.
Positional arguments<instance>
ID of the instance.
trove configuration-instances commandusage: trove configuration-instances <configuration_group>
Lists all instances associated with a configuration group.
Positional arguments<configuration_group>
ID of the configuration group.
trove configuration-list commandusage: trove configuration-list
Lists all configuration groups.
trove configuration-parameter-list commandusage: trove configuration-parameter-list <datastore_version>
[--datastore <datastore>]
Lists available parameters for a configuration group.
Positional arguments<datastore_version>
Datastore version name or ID assigned to the
configuration group.
Optional arguments--datastore <datastore> ID
or name of the datastore to list configuration
parameters for. Optional if the ID of the
datastore_version is provided.
trove configuration-parameter-show commandusage: trove configuration-parameter-show <datastore_version> <parameter>
[--datastore <datastore>]
Shows details of a configuration parameter.
Positional arguments<datastore_version>
Datastore version name or ID assigned to the
configuration group.
<parameter>
Name of the configuration parameter.
Optional arguments--datastore <datastore> ID
or name of the datastore to list configuration
parameters for. Optional if the ID of the
datastore_version is provided.
trove configuration-patch commandusage: trove configuration-patch <configuration_group> <values>
Patches a configuration group.
Positional arguments<configuration_group>
ID of the configuration group.
<values>
Dictionary of the values to set.
trove configuration-show commandusage: trove configuration-show <configuration_group>
Shows details of a configuration group.
Positional arguments<configuration_group>
ID of the configuration group.
trove configuration-update commandusage: trove configuration-update <configuration_group> <values>
[--name <name>]
[--description <description>]
Updates a configuration group.
Positional arguments<configuration_group>
ID of the configuration group.
<values>
Dictionary of the values to set.
Optional arguments--name <name>
Name of the configuration group.
--description <description>
An optional description for the configuration
group.
trove create commandusage: trove create <name> <flavor_id>
[--size <size>]
[--databases <databases> [<databases> ...]]
[--users <users> [<users> ...]] [--backup <backup>]
[--availability_zone <availability_zone>]
[--datastore <datastore>]
[--datastore_version <datastore_version>]
[--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid>]
[--configuration <configuration>] [--slave_of <master_id>]
Creates a new instance.
Positional arguments<name>
Name of the instance.
<flavor_id>
Flavor of the instance.
Optional arguments--size <size>
Size of the instance disk volume in GB.
Required when volume support is enabled.
--databases <databases> [<databases> ...]
Optional list of databases.
--users <users> [<users> ...]
Optional list of users in the form
user:password.
--backup <backup> A
backup ID.
--availability_zone <availability_zone>
The Zone hint to give to nova.
--datastore <datastore> A
datastore name or ID.
--datastore_version <datastore_version>
A datastore version name or ID.
--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid>
Create a NIC on the instance. Specify option
multiple times to create multiple NICs. net-
id: attach NIC to network with this ID
(either port-id or net-id must be
specified), v4-fixed-ip: IPv4 fixed address
for NIC (optional), port-id: attach NIC to
port with this ID (either port-id or net-id
must be specified).
--configuration <configuration>
ID of the configuration group to attach to
the instance.
--slave_of <master_id> ID
of an existing instance to replicate
from.
trove database-create commandusage: trove database-create <instance> <name>
[--character_set <character_set>]
[--collate <collate>]
Creates a database on an instance.
Positional arguments<instance>
ID of the instance.
<name>
Name of the database.
Optional arguments--character_set <character_set>
Optional character set for database.
--collate <collate>
Optional collation type for database.
trove database-delete commandusage: trove database-delete <instance> <database>
Deletes a database from an instance.
Positional arguments<instance>
ID of the instance.
<database>
Name of the database.
trove database-list commandusage: trove database-list <instance>
Lists available databases on an instance.
Positional arguments<instance>
ID of the instance.
trove datastore-list commandusage: trove datastore-list
Lists available datastores.
trove datastore-show commandusage: trove datastore-show <datastore>
Shows details of a datastore.
Positional arguments<datastore>
ID of the datastore.
trove datastore-version-list commandusage: trove datastore-version-list <datastore>
Lists available versions for a datastore.
Positional arguments<datastore>
ID or name of the datastore.
trove datastore-version-show commandusage: trove datastore-version-show <datastore_version>
[--datastore <datastore>]
Shows details of a datastore version.
Positional arguments<datastore_version>
ID or name of the datastore version.
Optional arguments--datastore <datastore> ID
or name of the datastore. Optional if the ID of
the datastore_version is provided.
trove delete commandusage: trove delete <instance>
Deletes an instance.
Positional arguments<instance>
ID of the instance.
trove detach-replica commandusage: trove detach-replica <instance>
Detaches a replica instance from its replication source.
Positional arguments<instance>
ID of the instance.
trove flavor-list commandusage: trove flavor-list
Lists available flavors.
trove flavor-show commandusage: trove flavor-show <flavor>
Shows details of a flavor.
Positional arguments<flavor>
ID or name of the flavor.
trove limit-list commandusage: trove limit-list
Lists the limits for a tenant.
trove list commandusage: trove list [--limit <limit>] [--marker <ID>]
Lists all the instances.
Optional arguments--limit <limit>
Limit the number of results displayed.
--marker <ID>
Begin displaying the results for IDs greater than the
specified marker. When used with --limit, set this to the
last ID displayed in the previous run.
trove metadata-create commandusage: trove metadata-create <instance_id> <key> <value>
Creates metadata in the database for instance <id>.
Positional arguments<instance_id>
UUID for instance
<key>
Key for assignment
<value>
Value to assign to <key>
trove metadata-delete commandusage: trove metadata-delete <instance_id> <key>
Deletes metadata for instance <id>.
Positional arguments<instance_id>
UUID for instance
<key>
Metadata key to delete
trove metadata-edit commandusage: trove metadata-edit <instance_id> <key> <value>
Replaces metadata value with a new one, this is non-destructive.
Positional arguments<instance_id>
UUID for instance
<key>
Key to replace
<value>
New value to assign to <key>
trove metadata-list commandusage: trove metadata-list <instance_id>
Shows all metadata for instance <id>.
Positional arguments<instance_id>
UUID for instance
trove metadata-show commandusage: trove metadata-show <instance_id> <key>
Shows metadata entry for key <key> and instance <id>.
Positional arguments<instance_id>
UUID for instance
<key>
key to display
trove metadata-update commandusage: trove metadata-update <instance_id> <key> <newkey> <value>
Updates metadata, this is destructive.
Positional arguments<instance_id>
UUID for instance
<key>
Key to update
<newkey>
New key
<value>
Value to assign to <newkey>
trove resize-instance commandusage: trove resize-instance <instance> <flavor_id>
Resizes an instance with a new flavor.
Positional arguments<instance>
ID of the instance.
<flavor_id>
New flavor of the instance.
trove resize-volume commandusage: trove resize-volume <instance> <size>
Resizes the volume size of an instance.
Positional arguments<instance>
ID of the instance.
<size>
New size of the instance disk volume in GB.
trove restart commandusage: trove restart <instance>
Restarts an instance.
Positional arguments<instance>
ID of the instance.
trove root-enable commandusage: trove root-enable <instance>
Enables root for an instance and resets if already exists.
Positional arguments<instance>
ID of the instance.
trove root-show commandusage: trove root-show <instance>
Gets status if root was ever enabled for an instance.
Positional arguments<instance>
ID of the instance.
trove secgroup-add-rule commandusage: trove secgroup-add-rule <security_group> <cidr>
Creates a security group rule.
Positional arguments<security_group>
Security group ID.
<cidr>
CIDR address.
trove secgroup-delete-rule commandusage: trove secgroup-delete-rule <security_group_rule>
Deletes a security group rule.
Positional arguments<security_group_rule>
Name of security group rule.
trove secgroup-list commandusage: trove secgroup-list
Lists all security groups.
trove secgroup-list-rules commandusage: trove secgroup-list-rules <security_group>
Lists all rules for a security group.
Positional arguments<security_group>
Security group ID.
trove secgroup-show commandusage: trove secgroup-show <security_group>
Shows details of a security group.
Positional arguments<security_group>
Security group ID
trove show commandusage: trove show <instance>
Shows details of an instance.
Positional arguments<instance>
ID or name of the instance.
trove update commandusage: trove update <instance>
[--name <name>] [--configuration <configuration>]
[--detach-replica-source] [--remove_configuration]
Updates an instance: Edits name, configuration, or replica source.
Positional arguments<instance>
UUID of the instance.
Optional arguments--name <name>
Name of the instance.
--configuration <configuration>
ID of the configuration reference to attach.
--detach-replica-source
Detach the replica instance from its
replication source.
--remove_configuration
Drops the current configuration reference.
trove user-create commandusage: trove user-create <instance> <name> <password>
[--host <host>]
[--databases <databases> [<databases> ...]]
Creates a user on an instance.
Positional arguments<instance>
ID of the instance.
<name>
Name of user.
<password>
Password of user.
Optional arguments--host <host>
Optional host of user.
--databases <databases> [<databases> ...]
Optional list of databases.
trove user-delete commandusage: trove user-delete [--host <host>] <instance> <name>
Deletes a user from an instance.
Positional arguments<instance>
ID of the instance.
<name>
Name of user.
Optional arguments--host <host>
Optional host of user.
trove user-grant-access commandusage: trove user-grant-access <instance> <name> <databases> [<databases> ...]
[--host <host>]
Grants access to a database(s) for a user.
Positional arguments<instance>
ID of the instance.
<name>
Name of user.
<databases>
List of databases.
Optional arguments--host <host>
Optional host of user.
trove user-list commandusage: trove user-list <instance>
Lists the users for an instance.
Positional arguments<instance>
ID of the instance.
trove user-revoke-access commandusage: trove user-revoke-access [--host <host>] <instance> <name> <database>
Revokes access to a database for a user.
Positional arguments<instance>
ID of the instance.
<name>
Name of user.
<database>
A single database.
Optional arguments--host <host>
Optional host of user.
trove user-show commandusage: trove user-show [--host <host>] <instance> <name>
Shows details of a user of an instance.
Positional arguments<instance>
ID of the instance.
<name>
Name of user.
Optional arguments--host <host>
Optional host of user.
trove user-show-access commandusage: trove user-show-access [--host <host>] <instance> <name>
Shows access details of a user of an instance.
Positional arguments<instance>
ID of the instance.
<name>
Name of user.
Optional arguments--host <host>
Optional host of user.
trove user-update-attributes commandusage: trove user-update-attributes <instance> <name>
[--host <host>] [--new_name <new_name>]
[--new_password <new_password>]
[--new_host <new_host>]
Updates a user's attributes on an instance. At least one optional argument
must be provided.
Positional arguments<instance>
ID of the instance.
<name>
Name of user.
Optional arguments--host <host>
Optional host of user.
--new_name <new_name>
Optional new name of user.
--new_password <new_password>
Optional new password of user.
--new_host <new_host>
Optional new host of user.