OS Manuals

/usr/bin/vtctldclient

Autoscaling components for Kubernetes

From vitess-24 24.0.5-r11 (enterprise-packages), captured 2026-11-08 by running vtctldclient --help (exit 0). permalink

Executes a cluster management command on the remote vtctld server or alternatively as a standalone binary using --server=internal.
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).

Usage:
  vtctldclient [flags]
  vtctldclient [command]

Available Commands:
  AddCellInfo                 Registers a local topology service in a new cell by creating the CellInfo.
  AddCellsAlias               Defines a group of cells that can be referenced by a single name (the alias).
  ApplyKeyspaceRoutingRules   Applies the provided keyspace routing rules.
  ApplyRoutingRules           Applies the VSchema routing rules.
  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.
  ApplyShardRoutingRules      Applies the provided shard routing rules.
  ApplyVSchema                Applies the VTGate routing schema to the provided keyspace. Shows the result after application.
  Backup                      Uses the BackupStorage service on the given tablet to create and store a new backup.
  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.
  ChangeTabletTags            Changes the tablet tags for the specified tablet, if possible.
  ChangeTabletType            Changes the db type for the specified tablet, if possible.
  CheckThrottler              Issue a throttler check on the given tablet.
  CopySchemaShard             Copies the schema from a source shard's primary (or a specific tablet) to a destination shard. The schema is applied directly on the primary of the destination shard, and it is propagated to the replicas through binlogs.
  CreateKeyspace              Creates the specified keyspace in the topology.
  CreateShard                 Creates the specified shard in the topology.
  DeleteCellInfo              Deletes the CellInfo for the provided cell.
  DeleteCellsAlias            Deletes the CellsAlias for the provided alias.
  DeleteKeyspace              Deletes the specified keyspace from the topology.
  DeleteShards                Deletes the specified shards from the topology.
  DeleteSrvVSchema            Deletes the SrvVSchema object in the given cell.
  DeleteTablets               Deletes tablet(s) from the topology.
  DistributedTransaction      Perform commands on distributed transaction
  EmergencyReparentShard      Reparents the shard to the new primary. Assumes the old primary is dead and not responding.
  ExecuteFetchAsApp           Executes the given query as the App user on the remote tablet.
  ExecuteFetchAsDBA           Executes the given query as the DBA user on the remote tablet.
  ExecuteHook                 Runs the specified hook on the given tablet.
  ExecuteMultiFetchAsDBA      Executes given multiple queries as the DBA user on the remote tablet.
  FindAllShardsInKeyspace     Returns a map of shard names to shard references for a given keyspace.
  GenerateShardRanges         Print a set of shard ranges assuming a keyspace with N shards.
  GetBackups                  Lists backups for the given shard.
  GetCellInfo                 Gets the CellInfo object for the given cell.
  GetCellInfoNames            Lists the names of all cells in the cluster.
  GetCellsAliases             Gets all CellsAlias objects in the cluster.
  GetFullStatus               Outputs a JSON structure that contains full status of MySQL including the replication information, semi-sync information, GTID information among others.
  GetKeyspace                 Returns information about the given keyspace from the topology.
  GetKeyspaceRoutingRules     Displays the currently active keyspace routing rules.
  GetKeyspaces                Returns information about every keyspace in the topology.
  GetMirrorRules              Displays the VSchema mirror rules.
  GetPermissions              Displays the permissions for a tablet.
  GetRoutingRules             Displays the VSchema routing rules.
  GetSchema                   Displays the full schema for a tablet, optionally restricted to the specified tables/views.
  GetShard                    Returns information about a shard in the topology.
  GetShardReplication         Returns information about the replication relationships for a shard in the given cell(s).
  GetShardRoutingRules        Displays the currently active shard routing rules as a JSON document.
  GetSrvKeyspaceNames         Outputs a JSON mapping of cell=>keyspace names served in that cell. Omit to query all cells.
  GetSrvKeyspaces             Returns the SrvKeyspaces for the given keyspace in one or more cells.
  GetSrvVSchema               Returns the SrvVSchema for the given cell.
  GetSrvVSchemas              Returns the SrvVSchema for all cells, optionally filtered by the given cells.
  GetTablet                   Outputs a JSON structure that contains information about the tablet.
  GetTabletVersion            Print the version of a tablet from its debug vars.
  GetTablets                  Looks up tablets according to filter criteria.
  GetThrottlerStatus          Get the throttler status for the given tablet.
  GetTopologyPath             Gets the value associated with the particular path (key) in the topology server.
  GetVSchema                  Prints a JSON representation of a keyspace's topo record.
  GetWorkflows                Gets all vreplication workflows (Reshard, MoveTables, etc) in the given keyspace.
  LegacyVtctlCommand          Invoke a legacy vtctlclient command. Flag parsing is best effort.
  LookupVindex                Perform commands related to creating, backfilling, and externalizing Lookup Vindexes using VReplication workflows.
  Materialize                 Perform commands related to materializing query results from the source keyspace into tables in the target keyspace.
  Migrate                     Migrate is used to import data from an external cluster into the current cluster.
  Mount                       Mount is used to link an external Vitess cluster in order to migrate data from it.
  MoveTables                  Perform commands related to moving tables from a source keyspace to a target keyspace.
  OnlineDDL                   Operates on online DDL (schema migrations).
  PingTablet                  Checks that the specified tablet is awake and responding to RPCs. This command can be blocked by other in-flight operations.
  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.
  RebuildKeyspaceGraph        Rebuilds the serving data for the keyspace(s). This command may trigger an update to all connected clients.
  RebuildVSchemaGraph         Rebuilds the cell-specific SrvVSchema from the global VSchema objects in the provided cells (or all cells if none provided).
  RefreshState                Reloads the tablet record on the specified tablet.
  RefreshStateByShard         Reloads the tablet record all tablets in the shard, optionally limited to the specified cells.
  ReloadSchema                Reloads the schema on a remote tablet.
  ReloadSchemaKeyspace        Reloads the schema on all tablets in a keyspace. This is done on a best-effort basis.
  ReloadSchemaShard           Reloads the schema on all tablets in a shard. This is done on a best-effort basis.
  RemoveBackup                Removes the given backup from the BackupStorage used by vtctld.
  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.
  RemoveShardCell             Remove the specified cell from the specified shard's Cells list.
  ReparentTablet              Reparent a tablet to the current primary in the shard.
  Reshard                     Perform commands related to resharding a keyspace.
  RestoreFromBackup           Stops mysqld on the specified tablet and restores the data from either the latest backup or closest before `backup-timestamp`.
  RunHealthCheck              Runs a healthcheck on the remote tablet.
  SetKeyspaceDurabilityPolicy Sets the durability-policy used by the specified keyspace.
  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`.
  SetShardTabletControl       Sets the TabletControl record for a shard and tablet type. Only use this for an emergency fix or after a finished MoveTables.
  SetVtorcEmergencyReparent   Enable/disables the use of EmergencyReparentShard in VTOrc recoveries for a given keyspace or keyspace/shard.
  SetWritable                 Sets the specified tablet as writable or read-only.
  ShardReplicationFix         Walks through a ShardReplication object and fixes the first error encountered.
  ShardReplicationPositions
  SleepTablet                 Blocks the action queue on the specified tablet for the specified amount of time. This is typically used for testing.
  SourceShardAdd              Adds the SourceShard record with the provided index for emergencies only. It does not call RefreshState for the shard primary.
  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.
  StartReplication            Starts replication on the specified tablet.
  StopReplication             Stops replication on the specified tablet.
  TabletExternallyReparented  Updates the topology record for the tablet's shard to acknowledge that an external tool made this tablet the primary.
  UpdateCellInfo              Updates the content of a CellInfo with the provided parameters, creating the CellInfo if it does not exist.
  UpdateCellsAlias            Updates the content of a CellsAlias with the provided parameters, creating the CellsAlias if it does not exist.
  UpdateThrottlerConfig       Update the tablet throttler configuration for all tablets in the given keyspace (across all cells)
  VDiff                       Perform commands related to diffing tables involved in a VReplication workflow between the source and target.
  Validate                    Validates that all nodes reachable from the global replication graph, as well as all tablets in discoverable cells, are consistent.
  ValidateKeyspace            Validates that all nodes reachable from the specified keyspace are consistent.
  ValidatePermissionsKeyspace Validates that the permissions on the primary of the first shard match those of all of the other tablets in the keyspace.
  ValidatePermissionsShard    Validates that the permissions on the primary match all of the replicas.
  ValidateSchemaKeyspace      Validates that the schema on the primary tablet for the first shard matches the schema on all other tablets in the keyspace.
  ValidateSchemaShard         Validates that the schema on the primary tablet for the specified shard matches the schema on all other tablets in that shard.
  ValidateShard               Validates that all nodes reachable from the specified shard are consistent.
  ValidateVersionKeyspace     Validates that the version on the primary tablet of the first shard matches all of the other tablets in the keyspace.
  ValidateVersionShard        Validates that the version on the primary matches all of the replicas.
  Workflow                    Administer VReplication workflows (Reshard, MoveTables, etc) in the given keyspace.
  WriteTopologyPath           Copies a local file to the topology server at the given path.
  completion                  Generate the autocompletion script for the specified shell
  help                        Help about any command

Flags:
      --action-timeout duration                  timeout to use for the command (default 1h0m0s)
      --alsologtostderr                          log to standard error as well as files
      --compact                                  use compact format for otherwise verbose outputs
      --grpc-auth-static-client-creds string     When using grpc_static_auth in the server, this file provides the credentials to use to authenticate with server.
      --grpc-compression string                  Which protocol to use for compressing gRPC. Default: nothing. Supported: snappy
      --grpc-enable-tracing                      Enable gRPC tracing.
      --grpc-initial-conn-window-size int        gRPC initial connection window size
      --grpc-initial-window-size int             gRPC initial window size
      --grpc-keepalive-time duration             After a duration of this time, if the client doesn't see any activity, it pings the server to see if the transport is still alive. (default 10s)
      --grpc-keepalive-timeout duration          After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s)
      --grpc-max-message-size int                Maximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size'. (default 16777216)
      --grpc-prometheus                          Enable gRPC monitoring with Prometheus.
  -h, --help                                     help for vtctldclient
      --keep-logs duration                       keep logs for this long (using ctime) (zero to keep forever)
      --keep-logs-by-mtime duration              keep logs for this long (using mtime) (zero to keep forever)
      --log-format string                        log output format: json for machine-readable JSON, text for human-readable colored output (default "json")
      --log-level string                         minimum log level when structured logging is enabled (debug, info, warn, error) (default "info")
      --log-rotate-max-size uint                 size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
      --log-structured                           enable structured JSON logging (default true)
      --log_backtrace_at traceLocations          when logging hits line file:N, emit a stack trace
      --log_dir string                           If non-empty, write log files in this directory
      --log_link string                          If non-empty, add symbolic links in this directory to the log files
      --logbuflevel int                          Buffer log messages logged at this level or lower (-1 means don't buffer; 0 means buffer INFO only; ...). Has limited applicability on non-prod platforms.
      --logtostderr                              log to standard error instead of files
      --mysql-server-version string              MySQL server version to advertise. (default "8.4.6-Vitess")
      --purge-logs-interval duration             how often try to remove old logs (default 1h0m0s)
      --security-policy string                   the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
      --server string                            server to use for the connection (required)
      --stderrthreshold severityFlag             logs at or above this threshold go to stderr (default 1)
      --tablet-manager-grpc-ca string            the server ca to use to validate servers when connecting
      --tablet-manager-grpc-cert string          the cert to use to connect
      --tablet-manager-grpc-concurrency int      concurrency to use to talk to a vttablet server for performance-sensitive RPCs (like ExecuteFetchAs{Dba,App}, CheckThrottler and FullStatus) (default 8)
      --tablet-manager-grpc-crl string           the server crl to use to validate server certificates when connecting
      --tablet-manager-grpc-key string           the key to use to connect
      --tablet-manager-grpc-server-name string   the server name to use to validate server certificate
      --tablet-manager-protocol string           Protocol to use to make tabletmanager RPCs to vttablets. (default "grpc")
      --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")
  -v, --v Level                                  log level for V logs
      --version                                  version for vtctldclient
      --vmodule vModuleFlag                      comma-separated list of pattern=N settings for file-filtered logging
      --vtctl-client-protocol string             Protocol to use to talk to the vtctl server. (default "grpc")
      --vtctld-grpc-ca string                    the server ca to use to validate servers when connecting
      --vtctld-grpc-cert string                  the cert to use to connect
      --vtctld-grpc-crl string                   the server crl to use to validate server certificates when connecting
      --vtctld-grpc-key string                   the key to use to connect
      --vtctld-grpc-server-name string           the server name to use to validate server certificate

Use "vtctldclient [command] --help" for more information about a command.
Options (48)
OptionDescriptionSource
--action-timeout durationtimeout to use for the command (default 1h0m0s)help
--alsologtostderrlog to standard error as well as fileshelp
--compactuse compact format for otherwise verbose outputshelp
--grpc-auth-static-client-creds stringWhen using grpc_static_auth in the server, this file provides the credentials to use to authenticate with server.help
--grpc-compression stringWhich protocol to use for compressing gRPC.help
--grpc-enable-tracingEnable gRPC tracing.help
--grpc-initial-conn-window-size intgRPC initial connection window sizehelp
--grpc-initial-window-size intgRPC initial window sizehelp
--grpc-keepalive-time durationAfter a duration of this time, if the client doesn't see any activity, it pings the server to see if the transport is still alive.help
--grpc-keepalive-timeout durationAfter having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed.help
--grpc-max-message-size intMaximum allowed RPC message size.help
--grpc-prometheusEnable gRPC monitoring with Prometheus.help
-h, --helphelp for vtctldclienthelp
--keep-logs durationkeep logs for this long (using ctime) (zero to keep forever)help
--keep-logs-by-mtime durationkeep logs for this long (using mtime) (zero to keep forever)help
--log-format stringlog output format: json for machine-readable JSON, text for human-readable colored output (default "json")help
--log-level stringminimum log level when structured logging is enabled (debug, info, warn, error) (default "info")help
--log-rotate-max-size uintsize in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)help
--log-structuredenable structured JSON logging (default true)help
--log_backtrace_at traceLocationswhen logging hits line file:N, emit a stack tracehelp
--log_dir stringIf non-empty, write log files in this directoryhelp
--log_link stringIf non-empty, add symbolic links in this directory to the log fileshelp
--logbuflevel intBuffer log messages logged at this level or lower (-1 means don't buffer;help
--logtostderrlog to standard error instead of fileshelp
--mysql-server-version stringMySQL server version to advertise.help
--purge-logs-interval durationhow often try to remove old logs (default 1h0m0s)help
--security-policy stringthe name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)help
--server stringserver to use for the connection (required)help
--stderrthreshold severityFlaglogs at or above this threshold go to stderr (default 1)help
--tablet-manager-grpc-ca stringthe server ca to use to validate servers when connectinghelp
--tablet-manager-grpc-cert stringthe cert to use to connecthelp
--tablet-manager-grpc-concurrency intconcurrency to use to talk to a vttablet server for performance-sensitive RPCs (like ExecuteFetchAs{Dba,App}, CheckThrottler and FullStatus) (default 8)help
--tablet-manager-grpc-crl stringthe server crl to use to validate server certificates when connectinghelp
--tablet-manager-grpc-key stringthe key to use to connecthelp
--tablet-manager-grpc-server-name stringthe server name to use to validate server certificatehelp
--tablet-manager-protocol stringProtocol to use to make tabletmanager RPCs to vttablets.help
--topo-global-root stringthe path of the global topology data in the global topology server (default "/vitess/global")help
--topo-global-server-address stringsthe address of the global topology server(s) (default [localhost:2379])help
--topo-implementation stringthe topology implementation to use (default "etcd2")help
-v, --v Levellog level for V logshelp
--versionversion for vtctldclienthelp
--vmodule vModuleFlagcomma-separated list of pattern=N settings for file-filtered logginghelp
--vtctl-client-protocol stringProtocol to use to talk to the vtctl server.help
--vtctld-grpc-ca stringthe server ca to use to validate servers when connectinghelp
--vtctld-grpc-cert stringthe cert to use to connecthelp
--vtctld-grpc-crl stringthe server crl to use to validate server certificates when connectinghelp
--vtctld-grpc-key stringthe key to use to connecthelp
--vtctld-grpc-server-name stringthe server name to use to validate server certificatehelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.