vtctl Topo Command Reference

The following vtctl commands are available for administering Topology Services.

Commands

TopoCat

Retrieves the file(s) at <path> from the topo service, and displays it. It can resolve wildcards, and decode the proto-encoded data.

Example

  1. TopoCat -- [--cell <cell>] [--decode_proto] [--long] <path> [<path>...]

Flags

NameTypeDefinition
cellstringtopology cell to cat the file from. Defaults to global cell.
decode_protoBooleandecode proto files and display them as text. Defaults to false.
decode_proto_jsonBooleandecode proto files and display them as json. Defaults to false.
longBooleanlong listing. Defaults to false.

Arguments

  • <cell> – Required. 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.
  • <path> – Required.
  • <path>. – Optional.

Errors

  • <TopoCat>: no path specified. This error occurs if the command is not called with at least one argument.
  • <TopoCat>: invalid wildcards. If you send paths that don’t contain any wildcard and don’t exist.
  • <TopoCat>: some paths had errors. If there is an error getting node data for given paths.

TopoCp

Copy data at given path from topo service to local file or vice versa.

Example

  1. TopoCp -- [--cell <cell>] [--to_topo] <src> <dst>

Flags

NameTypeDefinition
cellstringtopology cell to use for the copy. Defaults to global cell.
to_topoBooleancopies from local server to topo instead (reverse direction). Defaults to false.

Arguments

  • <cell> – Required. 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.
  • <src> – Required. Source from which data needs to be copied. It can be local file or some path in topo service, depedning on if to_topo is specified.
  • <dst>. – Required. Destination to which data will be copied. It can be local file or some path in topo service, depedning on if to_topo is specified.

Errors

  • <TopoCp>: need source and destination. This error occurs if the command is not called with proper src and dst.

See Also