vtctl Generic Command Reference

The following generic vtctl commands are available for administering Vitess.

Commands #

Validate #

Validates that all nodes reachable from the global replication graph and that all tablets in all discoverable cells are consistent.

Example #

Validate [-ping-tablets]

Flags #

NameTypeDefinition
ping-tabletsBooleanIndicates whether all tablets should be pinged during the validation process

ListAllTablets #

Lists all tablets in an awk-friendly way.

Example #

ListAllTablets [-keyspace=''] [-tablet_type=<primary,replica,rdonly,spare>] [<cell_name1>,<cell_name2>,...]

Arguments #

  • <cell_name> – Optional. A cell is a location for a service. Generally, a cell resides in only one cluster. In Vitess, the terms "cell" and "data center" are interchangeable. The argument value is a string that does not contain whitespace. This allows you to request server side filtering to exlude tablets in cells not explicitly specified.
  • keyspace – Optional. A keyspace is a logical database. This allows you to request server side filtering to exlude tablets not in this keyspace.
  • tablet_type – Optional. A tablet type is one of PRIMARY,REPLICA,RDONLY,SPARE. This allows you to request server side filtering to exlude tablets not of this type.

Errors #

  • An error will be returned if you specify a non-existent cell or an invalid tablet type.

ListTablets #

Lists specified tablets in an awk-friendly way.

Example #

ListTablets <tablet alias> ...

Arguments #

  • <tablet alias> – Required. A Tablet Alias uniquely identifies a vttablet. The argument value is in the format <cell name>-<uid>. To specify multiple values for this argument, separate individual values with a space.

Errors #

  • the <tablet alias> argument is required for the <ListTablets> command This error occurs if the command is not called with at least one argument.

Help #

Provides help for a command.

Example #

Help [command name]

See Also #