vtctldclient
vtctldclient #
Executes a cluster management command on the remote vtctld server.
Synopsis #
Executes a cluster management command on the remote vtctld server. If there are no running vtctld servers -- for example when bootstrapping a new Vitess cluster -- you can specify a --server value of 'internal'. When doing so, you would use the --topo* flags so that the client can connect directly to the topo server(s).
vtctldclient [flags]
Options #
--action_timeout duration timeout to use for the command (default 1h0m0s)
--compact use compact format for otherwise verbose outputs
-h, --help help for vtctldclient
--server string server to use for the connection (required)
--topo-global-root string the path of the global topology data in the global topology server (default "/vitess/global")
--topo-global-server-address strings the address of the global topology server(s) (default [localhost:2379])
--topo-implementation string the topology implementation to use (default "etcd2")
SEE ALSO #
- vtctldclient AddCellInfo - Registers a local topology service in a new cell by creating the CellInfo.
- vtctldclient AddCellsAlias - Defines a group of cells that can be referenced by a single name (the alias).
- vtctldclient ApplyKeyspaceRoutingRules - Applies the provided keyspace routing rules.
- vtctldclient ApplyRoutingRules - Applies the VSchema routing rules.
- vtctldclient ApplySchema - Applies the schema change to the specified keyspace on every primary, running in parallel on all shards. The changes are then propagated to replicas via replication.
- vtctldclient ApplyShardRoutingRules - Applies the provided shard routing rules.
- vtctldclient ApplyVSchema - Applies the VTGate routing schema to the provided keyspace. Shows the result after application.
- vtctldclient Backup - Uses the BackupStorage service on the given tablet to create and store a new backup.
- vtctldclient BackupShard - Finds the most up-to-date REPLICA, RDONLY, or SPARE tablet in the given shard and uses the BackupStorage service on that tablet to create and store a new backup.
- vtctldclient ChangeTabletTags - Changes the tablet tags for the specified tablet, if possible.
- vtctldclient ChangeTabletType - Changes the db type for the specified tablet, if possible.
- vtctldclient CheckThrottler - Issue a throttler check on the given tablet.
- vtctldclient CreateKeyspace - Creates the specified keyspace in the topology.
- vtctldclient CreateShard - Creates the specified shard in the topology.
- vtctldclient DeleteCellInfo - Deletes the CellInfo for the provided cell.
- vtctldclient DeleteCellsAlias - Deletes the CellsAlias for the provided alias.
- vtctldclient DeleteKeyspace - Deletes the specified keyspace from the topology.
- vtctldclient DeleteShards - Deletes the specified shards from the topology.
- vtctldclient DeleteSrvVSchema - Deletes the SrvVSchema object in the given cell.
- vtctldclient DeleteTablets - Deletes tablet(s) from the topology.
- vtctldclient DistributedTransaction - Perform commands on distributed transaction
- vtctldclient EmergencyReparentShard - Reparents the shard to the new primary. Assumes the old primary is dead and not responding.
- vtctldclient ExecuteFetchAsApp - Executes the given query as the App user on the remote tablet.
- vtctldclient ExecuteFetchAsDBA - Executes the given query as the DBA user on the remote tablet.
- vtctldclient ExecuteHook - Runs the specified hook on the given tablet.
- vtctldclient ExecuteMultiFetchAsDBA - Executes given multiple queries as the DBA user on the remote tablet.
- vtctldclient FindAllShardsInKeyspace - Returns a map of shard names to shard references for a given keyspace.
- vtctldclient GenerateShardRanges - Print a set of shard ranges assuming a keyspace with N shards.
- vtctldclient GetBackups - Lists backups for the given shard.
- vtctldclient GetCellInfo - Gets the CellInfo object for the given cell.
- vtctldclient GetCellInfoNames - Lists the names of all cells in the cluster.
- vtctldclient GetCellsAliases - Gets all CellsAlias objects in the cluster.
- vtctldclient GetFullStatus - Outputs a JSON structure that contains full status of MySQL including the replication information, semi-sync information, GTID information among others.
- vtctldclient GetKeyspace - Returns information about the given keyspace from the topology.
- vtctldclient GetKeyspaceRoutingRules - Displays the currently active keyspace routing rules.
- vtctldclient GetKeyspaces - Returns information about every keyspace in the topology.
- vtctldclient GetMirrorRules - Displays the VSchema mirror rules.
- vtctldclient GetPermissions - Displays the permissions for a tablet.
- vtctldclient GetRoutingRules - Displays the VSchema routing rules.
- vtctldclient GetSchema - Displays the full schema for a tablet, optionally restricted to the specified tables/views.
- vtctldclient GetShard - Returns information about a shard in the topology.
- vtctldclient GetShardReplication - Returns information about the replication relationships for a shard in the given cell(s).
- vtctldclient GetShardRoutingRules - Displays the currently active shard routing rules as a JSON document.
- vtctldclient GetSrvKeyspaceNames - Outputs a JSON mapping of cell=>keyspace names served in that cell. Omit to query all cells.
- vtctldclient GetSrvKeyspaces - Returns the SrvKeyspaces for the given keyspace in one or more cells.
- vtctldclient GetSrvVSchema - Returns the SrvVSchema for the given cell.
- vtctldclient GetSrvVSchemas - Returns the SrvVSchema for all cells, optionally filtered by the given cells.
- vtctldclient GetTablet - Outputs a JSON structure that contains information about the tablet.
- vtctldclient GetTabletVersion - Print the version of a tablet from its debug vars.
- vtctldclient GetTablets - Looks up tablets according to filter criteria.
- vtctldclient GetThrottlerStatus - Get the throttler status for the given tablet.
- vtctldclient GetTopologyPath - Gets the value associated with the particular path (key) in the topology server.
- vtctldclient GetVSchema - Prints a JSON representation of a keyspace's topo record.
- vtctldclient GetWorkflows - Gets all vreplication workflows (Reshard, MoveTables, etc) in the given keyspace.
- vtctldclient LegacyVtctlCommand - Invoke a legacy vtctlclient command. Flag parsing is best effort.
- vtctldclient LookupVindex - Perform commands related to creating, backfilling, and externalizing Lookup Vindexes using VReplication workflows.
- vtctldclient Materialize - Perform commands related to materializing query results from the source keyspace into tables in the target keyspace.
- vtctldclient Migrate - Migrate is used to import data from an external cluster into the current cluster.
- vtctldclient Mount - Mount is used to link an external Vitess cluster in order to migrate data from it.
- vtctldclient MoveTables - Perform commands related to moving tables from a source keyspace to a target keyspace.
- vtctldclient OnlineDDL - Operates on online DDL (schema migrations).
- vtctldclient PingTablet - Checks that the specified tablet is awake and responding to RPCs. This command can be blocked by other in-flight operations.
- vtctldclient PlannedReparentShard - Reparents the shard to a new primary, or away from an old primary. Both the old and new primaries must be up and running.
- vtctldclient RebuildKeyspaceGraph - Rebuilds the serving data for the keyspace(s). This command may trigger an update to all connected clients.
- vtctldclient RebuildVSchemaGraph - Rebuilds the cell-specific SrvVSchema from the global VSchema objects in the provided cells (or all cells if none provided).
- vtctldclient RefreshState - Reloads the tablet record on the specified tablet.
- vtctldclient RefreshStateByShard - Reloads the tablet record all tablets in the shard, optionally limited to the specified cells.
- vtctldclient ReloadSchema - Reloads the schema on a remote tablet.
- vtctldclient ReloadSchemaKeyspace - Reloads the schema on all tablets in a keyspace. This is done on a best-effort basis.
- vtctldclient ReloadSchemaShard - Reloads the schema on all tablets in a shard. This is done on a best-effort basis.
- vtctldclient RemoveBackup - Removes the given backup from the BackupStorage used by vtctld.
- vtctldclient RemoveKeyspaceCell - Removes the specified cell from the Cells list for all shards in the specified keyspace (by calling RemoveShardCell on every shard). It also removes the SrvKeyspace for that keyspace in that cell.
- vtctldclient RemoveShardCell - Remove the specified cell from the specified shard's Cells list.
- vtctldclient ReparentTablet - Reparent a tablet to the current primary in the shard.
- vtctldclient Reshard - Perform commands related to resharding a keyspace.
- vtctldclient RestoreFromBackup - Stops mysqld on the specified tablet and restores the data from either the latest backup or closest before
backup-timestamp
. - vtctldclient RunHealthCheck - Runs a healthcheck on the remote tablet.
- vtctldclient SetKeyspaceDurabilityPolicy - Sets the durability-policy used by the specified keyspace.
- vtctldclient SetShardIsPrimaryServing - Add or remove a shard from serving. This is meant as an emergency function. It does not rebuild any serving graphs; i.e. it does not run
RebuildKeyspaceGraph
. - vtctldclient SetShardTabletControl - Sets the TabletControl record for a shard and tablet type. Only use this for an emergency fix or after a finished MoveTables.
- vtctldclient SetWritable - Sets the specified tablet as writable or read-only.
- vtctldclient ShardReplicationFix - Walks through a ShardReplication object and fixes the first error encountered.
- vtctldclient ShardReplicationPositions -
- vtctldclient SleepTablet - Blocks the action queue on the specified tablet for the specified amount of time. This is typically used for testing.
- vtctldclient SourceShardAdd - Adds the SourceShard record with the provided index for emergencies only. It does not call RefreshState for the shard primary.
- vtctldclient SourceShardDelete - Deletes the SourceShard record with the provided index. This should only be used for emergency cleanup. It does not call RefreshState for the shard primary.
- vtctldclient StartReplication - Starts replication on the specified tablet.
- vtctldclient StopReplication - Stops replication on the specified tablet.
- vtctldclient TabletExternallyReparented - Updates the topology record for the tablet's shard to acknowledge that an external tool made this tablet the primary.
- vtctldclient UpdateCellInfo - Updates the content of a CellInfo with the provided parameters, creating the CellInfo if it does not exist.
- vtctldclient UpdateCellsAlias - Updates the content of a CellsAlias with the provided parameters, creating the CellsAlias if it does not exist.
- vtctldclient UpdateThrottlerConfig - Update the tablet throttler configuration for all tablets in the given keyspace (across all cells)
- vtctldclient VDiff - Perform commands related to diffing tables involved in a VReplication workflow between the source and target.
- vtctldclient Validate - Validates that all nodes reachable from the global replication graph, as well as all tablets in discoverable cells, are consistent.
- vtctldclient ValidateKeyspace - Validates that all nodes reachable from the specified keyspace are consistent.
- vtctldclient ValidateSchemaKeyspace - Validates that the schema on the primary tablet for shard 0 matches the schema on all other tablets in the keyspace.
- vtctldclient ValidateShard - Validates that all nodes reachable from the specified shard are consistent.
- vtctldclient ValidateVersionKeyspace - Validates that the version on the primary tablet of shard 0 matches all of the other tablets in the keyspace.
- vtctldclient ValidateVersionShard - Validates that the version on the primary matches all of the replicas.
- vtctldclient Workflow - Administer VReplication workflows (Reshard, MoveTables, etc) in the given keyspace.