doctl Verified current stable Not installed? Cloud Infrastructure

Doctl / Get Database Cluster Details

Get Database Cluster Details

Retrieves detailed information about a specific database cluster in DigitalOcean.

$
Terminal
doctl d g

When To Use

When diagnosing issues or retrieving configuration details of a deployed database cluster.

Pro Tip

Use the `--format` option to obtain output in JSON format, which may be easier for scripting and automation.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
ID          Name               Engine      Version   Size      Status
12345678    my-db-cluster     PostgreSQL   13.3      db-s-1vcpu-1gb  active
87654321    test-db-cluster   MySQL       8.0       db-s-2vcpu-2gb  active

Anatomy of Output

Understanding the result

Database cluster: <database_name> Output Header

Indicates which database cluster's details are being displayed.

ID: <database_id> Database Identifier

Unique identifier for the database cluster.

Status: <status> - <message> Current Status

Shows whether the cluster is running, down, or in maintenance.

Troubleshooting

Common pitfalls

Error: Database <database_id> not found

Solution: Confirm the database identifier is correct and that it exists.

Error: Insufficient permissions to access cluster details

Solution: Ensure the API token has appropriate permissions for the requested database.

Error: Request timeout, try again later

Solution: Retry the operation after a few minutes to manage transient issues.

Command Breakdown

What each part is doing

doctl
Base Command
The executable that performs this operation. Here it runs Doctl before the shell applies any redirect operators.
d
d|databases
The value supplied for d|databases.
g
g|get
The value supplied for g|get.

How To Run

Execution path

  1. Step 1

    Run `doctl databases get <cluster-id>` to retrieve details.

  2. Step 2

    Check the output for configuration and status information.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.