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 #
TopoCat -- [--cell <cell>] [--decode_proto] [--long] <path> [<path>...]
Flags #
| Name | Type | Definition |
|---|---|---|
| cell | string | topology cell to cat the file from. Defaults to global cell. |
| decode_proto | Boolean | decode proto files and display them as text. Defaults to false. |
| decode_proto_json | Boolean | decode proto files and display them as json. Defaults to false. |
| long | Boolean | long 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 #
TopoCp -- [--cell <cell>] [--to_topo] <src> <dst>
Flags #
| Name | Type | Definition |
|---|---|---|
| cell | string | topology cell to use for the copy. Defaults to global cell. |
| to_topo | Boolean | copies 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 ifto_topois specified.<dst>. – Required. Destination to which data will be copied. It can be local file or some path in topo service, depedning on ifto_topois specified.
Errors #
<TopoCp>: need source and destination. This error occurs if the command is not called with propersrcanddst.
See Also #
vtctl Topo Command Reference