<!-- auto-generated by cmd/docgen — do not edit -->

# bkt admin

Perform administrative operations on a Bitbucket Data Center instance.

This command group provides access to server-level management tasks such as
secrets rotation and logging configuration. All subcommands require a Data
Center context; they are not available for Bitbucket Cloud.

```
bkt admin <command> [flags]
```

### Examples

```bash
# Rotate encryption keys on the configured DC instance
  bkt admin secrets rotate

  # Show the current logging configuration
  bkt admin logging get

  # Set the logging level to DEBUG
  bkt admin logging set --level DEBUG
```

## Subcommands

| Subcommand | Description | Key Flags |
|---|---|---|
| [logging](#bkt-admin-logging) | Inspect or update logging settings *(DC)* | — |
| [secrets](#bkt-admin-secrets) | Manage secrets manager operations *(DC)* | — |

## bkt admin logging

Inspect or update the logging configuration of a Bitbucket Data Center
instance. You can view the current log level and async setting, or change
them at runtime without restarting the server. This command group is only
available for Data Center contexts.

```
bkt admin logging <command> [flags]
```

### Examples

```bash
# Show the current logging configuration
  bkt admin logging get

  # Set the log level to WARN
  bkt admin logging set --level WARN

  # Enable async logging at DEBUG level
  bkt admin logging set --level DEBUG --async
```

| Subcommand | Description |
|---|---|
| get | Show current logging configuration (DC only) |
| set | Update logging configuration (DC only) |

## bkt admin logging get

Display the current logging configuration of a Bitbucket Data Center
instance, including the active log level and whether asynchronous logging
is enabled. Output defaults to human-readable text but supports JSON via
the --json flag. Requires a Data Center context.

### Usage

```
bkt admin logging get [flags]
```

### Inherited Flags

| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` |  | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` |  | Apply a jq expression (implies JSON when no output format flag is set) |
| `--json` |  | Output in JSON format when supported |
| `--template` |  | Render output using Go templates |
| `--yaml` |  | Output in YAML format when supported |

### Examples

```bash
# Show logging config in human-readable format
  bkt admin logging get

  # Show logging config as JSON
  bkt admin logging get --json

  # Query a specific DC context
  bkt admin logging get --context prod-dc
```

## bkt admin logging set

Update the logging configuration of a Bitbucket Data Center instance at
runtime. You can change the log level (TRACE, DEBUG, INFO, WARN, ERROR)
and toggle asynchronous logging without restarting the server. This
command requires a Data Center context and will fail against Cloud
instances.

### Usage

```
bkt admin logging set [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--async` |  | Enable asynchronous logging |
| `--level` |  | Logging level: TRACE, DEBUG, INFO, WARN, ERROR |

### Inherited Flags

| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` |  | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` |  | Apply a jq expression (implies JSON when no output format flag is set) |
| `--json` |  | Output in JSON format when supported |
| `--template` |  | Render output using Go templates |
| `--yaml` |  | Output in YAML format when supported |

### Examples

```bash
# Set the log level to INFO
  bkt admin logging set --level INFO

  # Enable async logging
  bkt admin logging set --async

  # Set DEBUG level with async on a named context
  bkt admin logging set --level DEBUG --async --context staging-dc
```

## bkt admin secrets

Manage encryption keys and secrets through the Bitbucket Data Center
Secrets Manager plugin. Use the subcommands to rotate keys and perform
other secrets-related maintenance tasks on your DC instance.

```
bkt admin secrets <command> [flags]
```

### Examples

```bash
# Rotate the encryption keys
  bkt admin secrets rotate

  # Rotate keys using a specific DC context
  bkt admin secrets rotate --context my-dc
```

| Subcommand | Description |
|---|---|
| rotate | Rotate encryption keys via the Secrets Manager plugin (DC only) |

## bkt admin secrets rotate

Trigger an encryption key rotation on a Bitbucket Data Center instance
through the Secrets Manager plugin. This is a server-side operation that
generates a new encryption key and re-encrypts stored secrets. The command
requires a Data Center context and will fail against Cloud instances.

### Usage

```
bkt admin secrets rotate [flags]
```

### Inherited Flags

| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` |  | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` |  | Apply a jq expression (implies JSON when no output format flag is set) |
| `--json` |  | Output in JSON format when supported |
| `--template` |  | Render output using Go templates |
| `--yaml` |  | Output in YAML format when supported |

### Examples

```bash
# Rotate encryption keys on the default DC context
  bkt admin secrets rotate

  # Rotate keys on a named DC context
  bkt admin secrets rotate --context prod-dc
```

