doctl-databases
manage DigitalOcean managed database clusters
TLDR
SYNOPSIS
doctl databases command [arguments] [flags]
DESCRIPTION
doctl databases manages DigitalOcean Managed Databases: PostgreSQL, MySQL, Valkey (formerly Redis), MongoDB, Kafka, and OpenSearch clusters.The command provides full lifecycle management for clusters, from creation and configuration through resizing, migration, and deletion. Managed databases handle backups, minor-version updates, failover, and standby nodes for you; the CLI exposes the same operations available in the control panel, which makes them scriptable and usable from CI.Additional subcommands manage the databases inside a cluster, users, connection pools, read replicas, firewall rules, and the maintenance window. Connection strings, credentials, and the CA certificate can all be retrieved for application integration.Cluster IDs are UUIDs, but most subcommands also accept the cluster name. Add -o json to any command for machine-readable output.
SUBCOMMANDS
list
List your database clusters.create name
Create a cluster. Requires --engine (`pg`, `mysql`, `redis`, `valkey`, `mongodb`, `kafka`, `opensearch`), and accepts --region, --size, --num-nodes, --version, and --private-network-uuid.get id
Get details for a database cluster.delete id
Delete a cluster. -f, --force skips the confirmation prompt.connection id
Retrieve connection details (URI, host, port, user, password).get-ca id
Print the CA certificate used to verify TLS connections to the cluster.resize id
Resize a cluster with --size and --num-nodes.migrate id
Migrate a cluster to a new region.fork name
Create a new cluster by forking an existing one, optionally at a point in time.backups id
List the cluster's backups.events id
List cluster events.options
Show the engines, versions, regions, and sizes available.configuration
View or update engine-level cluster configuration.maintenance-window
Schedule the automatic maintenance window.storage-autoscale
Manage automatic storage scaling for the cluster.sql-mode
Get or set the SQL modes of a MySQL cluster.db
Manage the individual databases inside a cluster.user
Manage database users.pool
Manage connection pools (PostgreSQL).replica
Manage read-only replicas.firewalls
Manage which resources may connect to the cluster.indexes
Manage indexes on OpenSearch clusters.topics
Manage topics on Kafka clusters.
INSTALL
CAVEATS
delete destroys the cluster and all of its backups; there is no undo. Managed clusters accept TLS connections only, so clients usually need the certificate from get-ca. Resizing is one-way for storage (disks can grow but not shrink) and briefly interrupts connections while nodes are replaced. Not every subcommand applies to every engine: pool is PostgreSQL-only, sql-mode is MySQL-only, topics is Kafka-only, and indexes is OpenSearch-only.
SEE ALSO
doctl(1), doctl-databases-user(1), doctl-databases-replica(1), psql(1), mysql(1)
