doctl Verified current stable Not installed? Cloud Infrastructure

Doctl / List Available Versions For Database Engine

List Available Versions For Database Engine

List available versions for a specified database engine.

$
Terminal
doctl d o v --engine <pg|mysql|redis|mongodb>

When To Use

When planning version upgrades or downgrades for database instances.

Pro Tip

Be aware of version deprecation timelines published by DigitalOcean to avoid unsupported versions in the future.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
$ doctl databases versions --engine pg

Available PostgreSQL Versions:
+---------+---------------------+
| Version | Release Date        |
+---------+---------------------+
| 13.4    | 2021-08-10          |
| 12.7    | 2021-08-10          |
| 11.11   | 2021-08-10          |
| 10.16   | 2021-08-10          |
+---------+---------------------+

Anatomy of Output

Understanding the result

Available versions for PostgreSQL: Header

Descriptive header for the output.

1. 11.5 Version

Version available for deployment.

2. 12.3 Version

Latest stable version available.

3. 13.0 Version

Pre-release version with new features.

Power User Variants

Optimized versions

doctl databases versions --engine mysql

List available versions for MySQL databases.

doctl databases versions --engine redis --format=json

Output Redis versions in JSON.

Troubleshooting

Common pitfalls

Error: Unable to retrieve versions

Solution: Ensure connectivity to the DigitalOcean API server and your API token is valid.

Error: Invalid engine specified

Solution: Cross-check the engine name against supported options.

Error: Rate limit exceeded

Solution: Implement exponential backoffs in your scripting to adhere to rate limits.

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.
o
o|options
The value supplied for o|options.
v
v|versions
The value supplied for v|versions.
<pg|mysql|redis|mongodb>
pg|mysql|redis|mongodb
The value supplied for pg|mysql|redis|mongodb.
--engine
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run `doctl databases versions --engine pg` to list available PostgreSQL versions.

  2. Step 2

    Review the output for the desired version and release date.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.