> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cockroachlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Debug Zip

> [!NOTE]
>
> On a [secure cluster](https://docs.cockroachlabs.com/docs/stable/secure-a-cluster.md), you must be an `admin` user to access this area of the DB Console. Refer to [DB Console security](https://docs.cockroachlabs.com/docs/stable/ui-overview.md#db-console-access).

The **Generate Debug zip** page of the DB Console builds a [`cockroach debug zip`](https://docs.cockroachlabs.com/docs/stable/cockroach-debug-zip) command from a set of guided options. The page generates a command only. You run `cockroach debug zip` yourself from an environment that can connect to the cluster. The DB Console does not collect diagnostics.

To view this page, [access the DB Console](https://docs.cockroachlabs.com/docs/stable/ui-overview.md#db-console-access), click **Advanced Debug** in the left-hand navigation, and click **Generate Debug zip** in the **Reports** section.

## Required privileges

To view the **Generate Debug zip** page, the user must be a member of the `admin` role or must have the `VIEWDEBUG` [system privilege](https://docs.cockroachlabs.com/docs/stable/security-reference/authorization.md#supported-privileges) defined.

## Presets

![DB Console Generate Debug zip presets with Recommended selected](https://mintcdn.com/cockroachlabs/gqDff1784m19NQig/images/v26.4/ui_generate_debug_zip_presets.png?fit=max\&auto=format\&n=gqDff1784m19NQig\&q=85\&s=9a49e7a745af0ef21d525b75d2e2a576)

Select a preset to populate the command with a starting set of categories and a log-severity exclusion. Selecting or clearing individual options switches the preset to **Custom**.

| Preset | Description |
| - | - |
| **Recommended** | Selected by default. Collects cluster and node metadata, SQL tables, historical profiles, and logs at `WARNING` severity and above. |
| **Lightweight** | Collects cluster and node metadata, SQL tables, and logs at `ERROR` and `FATAL` severity only. |
| **Logs only** | Collects per-node log files and nothing else. |
| **Custom** | Reflects the current selection when it does not match another preset. |

## Categories

![DB Console Generate Debug zip Support diagnostics and Active capture categories](https://mintcdn.com/cockroachlabs/gqDff1784m19NQig/images/v26.4/ui_generate_debug_zip_categories.png?fit=max\&auto=format\&n=gqDff1784m19NQig\&q=85\&s=e0e2c948f1c1f39f53618481d5494e6a)

Categories are grouped into **Support diagnostics** and **Active capture**. Each category shows a **Collected from** label that indicates whether the data is collected once for the cluster or from each node. Active capture categories briefly touch the running cluster and can momentarily affect cluster performance.

Select or clear categories to control what the generated command collects. The **Logs** category includes a log-severity panel for excluding severities from log collection.

## Scope

![DB Console Generate Debug zip Scope section with UTC Time range, Nodes, and Redaction](https://mintcdn.com/cockroachlabs/gqDff1784m19NQig/images/v26.4/ui_generate_debug_zip_scope.png?fit=max\&auto=format\&n=gqDff1784m19NQig\&q=85\&s=0c467406f4fdf316de594a844b18d71b)

The **Scope** section applies the following options to the generated command:

* **UTC Time range**: Limit collection of log files, goroutine dumps, and heap profiles to a UTC time range. Select **Last 24 hours**, **Last 48 hours**, **Last 7 days**, or **Custom range** to enter a start and end. The default is **Last 24 hours**.
* **Nodes**: Collect from specific nodes by selecting them or entering node IDs or ranges, or select all nodes.
* **Redaction**: Redact [sensitive, personally-identifiable information (PII)](https://docs.cockroachlabs.com/docs/stable/cockroach-debug-zip.md#redact) from the generated `.zip`. Redaction is enabled by default.

## Connection

![DB Console Generate Debug zip Connection section on the On a remote machine tab](https://mintcdn.com/cockroachlabs/gqDff1784m19NQig/images/v26.4/ui_generate_debug_zip_connection_remote.png?fit=max\&auto=format\&n=gqDff1784m19NQig\&q=85\&s=79ec3b72d2944d0b1b751f1d8a8b6eaf)

Choose where you will run the generated command:

* **On this cluster**: Run the command from a node of the cluster you are viewing. The page fills in the cluster's connection URL (`--url`) and detects its security mode. On a secure cluster, enter the path to your certificate directory in **Certs directory** (`--certs-dir`).
* **On a remote machine**: Run the command from a machine outside the cluster. Enter the cluster's connection URL in **Cluster URL** (`--url`) and, on a secure cluster, the path to your certificate directory in **Certs directory** (`--certs-dir`). For an insecure cluster, select **Insecure cluster (no certs)** (`--insecure`).

**Certs directory** must be the absolute path to the certificate directory on the machine that runs the command.

The connection details persist across page reloads.

## Generated command

![DB Console Generate Debug zip generated command preview with Copy and Download](https://mintcdn.com/cockroachlabs/gqDff1784m19NQig/images/v26.4/ui_generate_debug_zip_generated_command.png?fit=max\&auto=format\&n=gqDff1784m19NQig\&q=85\&s=f18b6d9e12e42f4bce1a98fa9606848f)

The generated command appears in a preview that updates as you change options. Click **Copy** to copy the command, or **Download** to save it as a `collect-debug-zip.sh` script. Run the command or script from an environment that can connect to the cluster, using a `cockroach` binary that matches the cluster's version.

## See also

* [`cockroach debug zip`](https://docs.cockroachlabs.com/docs/stable/cockroach-debug-zip)
* [Advanced Debug Page](https://docs.cockroachlabs.com/docs/stable/ui-debug-pages.md)
* [Support Resources](https://docs.cockroachlabs.com/docs/stable/support-resources.md)
* [Troubleshooting Overview](https://docs.cockroachlabs.com/docs/stable/troubleshooting-overview.md)
