COCKROACH-DEBUG-RECOVER-COLLECT-INFO(1)

NAME

cockroach-debug-recover-collect-info - collect replica information from a cluster

SYNOPSIS

cockroach debug recover collect-info [destination-file] [flags]

DESCRIPTION

Collect information about replicas in the cluster.

The command can collect data from an online or an offline cluster.

In the first case, the address of a single healthy cluster node must be provided using the --host flag. This designated node will handle collection of data from all surviving nodes.

In the second case data is read directly from local stores on each node. CockroachDB must not be running on any node. The location of each store must be provided using the --store flag. The command must be executed for all surviving stores.

Multiple store locations can be provided to the command to collect all info from all stores on a node at once. It is also possible to call it per store, in that case all resulting files should be fed to the plan subcommand.

Collected information is written to a destination file if file name is provided, or to stdout.

See debug recover command help for more details on how to use this command.

OPTIONS

--cert-principal-map=[]

A comma separated list of : mappings. This
 allows mapping the principal in a cert to a DB principal such as "node" or
 "root" or any SQL user. This is intended for use in situations where the
 certificate management system places restrictions on the Subject.CommonName or
 SubjectAlternateName fields in the certificate (e.g. disallowing a CommonName
 such as "node" or "root"). If multiple mappings are provided for the same
 , the last one specified in the list takes precedence. A
 principal not specified in the map is passed through as-is via the identity
 function. A cert is allowed to authenticate a DB principal if the DB principal
 name is contained in the mapped CommonName or DNS-type SubjectAlternateName
 fields. It is permissible for the string to contain colons.

--certs-dir="/home/builder/.cockroach-certs"

Path to the directory containing SSL certificates and keys.
 Environment variable: COCKROACH_CERTS_DIR

--cluster-name=

Sets a name to verify the identity of a remote node or cluster. The value must
 match between this node and the remote node(s) specified via --join.

This can be used as an additional verification when either the node or
 cluster, or both, have not yet been initialized and do not yet know their
 cluster ID.

To introduce a cluster name into an already-initialized cluster, pair this
 flag with --disable-cluster-name-verification.

--disable-cluster-name-verification[=false]

Tell the server to ignore cluster name mismatches. This is meant for use when
 opting an existing cluster into starting to use cluster name verification, or
 when changing the cluster name.

The cluster should be restarted once with --cluster-name and
 --disable-cluster-name-verification combined, and once all nodes have been
 updated to know the new cluster name, the cluster can be restarted again with
 this flag removed.

--enterprise-encryption=

Specify encryption options for one of the stores on a node. If multiple
 stores exist, the flag must be specified for each store.

A valid enterprise license is required to use this functionality.

Key files should be generated by "cockroach gen encryption-key".

Valid fields:

    •   path (required): must match the path of one of the stores, or the special
                           value "*" to match all stores

    •   key (required): path to the current key file, or "plain"

    •   old-key (required): path to the previous key file, or "plain"

    •   rotation-period : amount of time after which data keys should be rotated

example:
   --enterprise-encryption=path=cockroach-data,key=/keys/aes-128.key,old-key=plain

-h, --help[=false]
    help for collect-info

--host=localhost:26257

CockroachDB node to connect to. This can be specified either as an
 address/hostname, or together with a port number as in -s myhost:26257. If
 the port number is left unspecified, it defaults to 26257. An IPv6 address
 can also be specified with the notation [...], for example [::1]:26257 or

Environment variable: COCKROACH_HOST

--insecure[=false]

Connect to a cluster without using TLS nor authentication. This makes the
 client-server connection vulnerable to MITM attacks. Use with care.
 Environment variable: COCKROACH_INSECURE

-c, --max-concurrency=40
    maximum concurrency when fanning out RPCs to nodes in the cluster

-s, --store=

The file path to a storage device. This flag must be specified separately for
 each storage device.

--store=/mnt/ssd01 --store=/mnt/ssd02 --store=/mnt/hda1

Flag is syntactically identical to --store flag of start command, but only
 path part is used. This is done to make flags interoperable between start and
 recover commands. See start --help for more flag details and examples.

--url=

Connection URL, of the form:
    postgresql://[user[:passwd]@]host[:port]/[db][?parameters...]
    postgresql://[user[:passwd]@]host[:port]/cluster:[virtual-cluster]/[db][?parameters...]

For example:
    postgresql://myuser@localhost:26257/mydb
    postgresql://myuser@localhost:26257/cluster:mycluster/mydb

If left empty, the discrete connection flags are used: host, port, user,
 database, insecure, certs-dir.
 Environment variable: COCKROACH_URL

-u, --user="root"

Database user name.
 Environment variable: COCKROACH_USER

OPTIONS INHERITED FROM PARENT COMMANDS

--enterprise-require-fips-ready[=false]
    abort if FIPS readiness checks fail

--log=

Logging configuration, expressed using YAML syntax. For example, you can
 change the default logging directory with: --log='file-defaults: {dir: ...}'.
 See the documentation for more options and details. To preview how the log
 configuration is applied, or preview the default configuration, you can use
 the 'cockroach debug check-log-config' sub-command.

--log-config-file=

File name to read the logging configuration from. This has the same effect as
 passing the content of the file via the --log flag.

--log-config-vars=[]

Environment variables that will be expanded if present in the body of the
 logging configuration.

--log-dir=

--log-dir=XXX is an alias for --log='file-defaults: {dir: XXX}'.

--logtostderr[=UNKNOWN]

--logtostderr=XXX is an alias for --log='sinks: {stderr: {filter: XXX}}'. If
 no value is specified, the default value for the command is inferred: INFO for
 server commands, WARNING for client commands.

--redactable-logs=false

--redactable-logs=XXX is an alias for --log='file-defaults: {redactable:
 XXX}}'.

--vmodule=
    comma-separated list of pattern=N settings for file-filtered logging (significantly hurts performance)

SEE ALSO

cockroach-debug-recover(1)

HISTORY

13-May-2026 Auto generated by spf13/cobra