Databases

This section details Database-related Linode CLI commands.

list

Aliases: ls

Display all Managed Databases that are accessible by your User, regardless of engine type.

Usage

The format accepted by this command.

linode-cli databases list [-h] [--region region]
    [--status status] [--engine engine] [--label label]
    [--type type] [--version version]
    [--order-by {region,status,engine,label,type,version}]
    [--order {asc,desc}]

Sample

Examples of how this command might be used.

linode-cli databases list

Filterable Attributes

Arguments used to define a filter for response entries.

Name

Type

Description

--engine

str

The Managed Database engine type.

--label

str

A unique, user-defined string referring to the Managed Database.

--region

str

The Region ID for the Managed Database.

--status

str

The operating status of the Managed Database.

--type

str

The Linode Instance type used by the Managed Database for its nodes.

--version

str

The Managed Database engine version.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

allow_list

[]str

[“203.0.113….2.0.1.0/24”]

A list of IP addresses that can access the Managed Database.

cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

created

str

2022-01-01T00:01:01

When this Managed Database was created.

encrypted

bool

N/A

Whether the Managed Databases is encrypted.

engine

str

mysql

The Managed Database engine type.

id

int

123

A unique ID that can be used to identify and reference the Managed Database.

instance_uri

str

/v4/databases…nstances/123

Append this to https://api.linode.com to run commands for the Managed Database.

label

str

example-db

A unique, user-defined string referring to the Managed Database.

region

str

us-east

The Region ID for the Managed Database.

status

str

active

The operating status of the Managed Database.

type

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

updated

str

2022-01-01T00:01:01

When this Managed Database was last updated.

version

str

8.0.26

The Managed Database engine version.

hosts

Name

Type

Example

Description

hosts.primary

str

lin-123-456-…linodedb.net

The primary host for the Managed Database.

hosts.secondary

str

lin-123-456-…linodedb.net

The secondary/private network host for the Managed Database.

updates

Name

Type

Example

Description

updates.day_of_week

int

1

The day to perform maintenance.

updates.duration

int

3

The maximum maintenance window time in hours.

updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

updates.week_of_month

int

N/A

The week of the month to perform monthly frequency updates.


engines

Display all available Managed Database engine types and versions.

Usage

The format accepted by this command.

linode-cli databases engines [-h] [--engine engine]
    [--version version] [--order-by {engine,version}]
    [--order {asc,desc}]

Sample

Examples of how this command might be used.

linode-cli databases engines

Filterable Attributes

Arguments used to define a filter for response entries.

Name

Type

Description

--engine

str

The Managed Database engine type.

--version

str

The Managed Database engine version.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

engine

str

mysql

The Managed Database engine type.

id

str

mysql/8.0.26

The Managed Database engine ID in engine/version format.

total_disk_size_gb

int

15

The total disk size of the database in GB.

used_disk_size_gb

int

2

The used space of the database in GB.

version

str

8.0.26

The Managed Database engine version.


types

Display all Managed Database node types.

Usage

The format accepted by this command.

linode-cli databases types [-h] [--order-by {}]
    [--order {asc,desc}]

Sample

Examples of how this command might be used.

linode-cli databases types

engine-view

Display information for a single Managed Database engine type and version.

Usage

The format accepted by this command.

linode-cli databases engine-view [-h] [--version version]
    [--engine engine] [--order-by {version,engine}]
    [--order {asc,desc}] engineId

Sample

Examples of how this command might be used.

linode-cli databases engine-view mysql/5.7.30

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

engineId

str

The ID of the Managed Database engine.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

engine

str

mysql

The Managed Database engine type.

id

str

mysql/8.0.26

The Managed Database engine ID in engine/version format.

total_disk_size_gb

int

15

The total disk size of the database in GB.

used_disk_size_gb

int

2

The used space of the database in GB.

version

str

8.0.26

The Managed Database engine version.


mysql-list

Display all accessible Managed MySQL Databases.

Usage

The format accepted by this command.

linode-cli databases mysql-list [-h] [--region region]
    [--status status] [--engine engine] [--version version]
    [--type type] [--label label]
    [--order-by {region,status,engine,version,type,label}]
    [--order {asc,desc}]

Sample

Examples of how this command might be used.

linode-cli databases mysql-list

Filterable Attributes

Arguments used to define a filter for response entries.

Name

Type

Description

--engine

str

The Managed Database engine type.

--label

str

A unique, user-defined string referring to the Managed Database.

--region

str

The Region ID for the Managed Database.

--status

str

The operating status of the Managed Database.

--type

str

The Linode Instance type used by the Managed Database for its nodes.

--version

str

The Managed Database engine version.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

allow_list

[]str

[“203.0.113….2.0.1.0/24”]

A list of IP addresses that can access the Managed Database.

cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

created

str

2022-01-01T00:01:01

When this Managed Database was created.

encrypted

bool

N/A

Whether the Managed Databases is encrypted.

engine

str

mysql

The Managed Database engine type.

id

int

123

A unique ID that can be used to identify and reference the Managed Database.

label

str

example-db

A unique, user-defined string referring to the Managed Database.

port

int

3306

The access port for this Managed Database.

region

str

us-east

The Region ID for the Managed Database.

replication_type

str

semi_synch

The replication method used for the Managed Database.

ssl_connection

bool

true

Whether to require SSL credentials to establish a connection to the Managed Database.

status

str

active

The operating status of the Managed Database.

total_disk_size_gb

int

15

The total disk size of the database in GB.

type

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

updated

str

2022-01-01T00:01:01

When this Managed Database was last updated.

used_disk_size_gb

int

2

The used space of the database in GB.

version

str

8.0.26

The Managed Database engine version.

hosts

Name

Type

Example

Description

hosts.primary

str

lin-123-456-…linodedb.net

The primary host for the Managed Database.

hosts.secondary

str

lin-123-456-…linodedb.net

The secondary/private network host for the Managed Database.

updates

Name

Type

Example

Description

updates.day_of_week

int

1

The day to perform maintenance.

updates.duration

int

3

The maximum maintenance window time in hours.

updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

updates.week_of_month

int

N/A

The week of the month to perform monthly frequency updates.


mysql-view

Display information for a single, accessible Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-view [-h] [--engine engine]
    [--version version] [--type type] [--label label]
    [--region region] [--status status]
    [--order-by {engine,version,type,label,region,status}]
    [--order {asc,desc}] instanceId

Sample

Examples of how this command might be used.

linode-cli databases mysql-view 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

allow_list

[]str

[“203.0.113….2.0.1.0/24”]

A list of IP addresses that can access the Managed Database.

cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

created

str

2022-01-01T00:01:01

When this Managed Database was created.

encrypted

bool

N/A

Whether the Managed Databases is encrypted.

engine

str

mysql

The Managed Database engine type.

id

int

123

A unique ID that can be used to identify and reference the Managed Database.

label

str

example-db

A unique, user-defined string referring to the Managed Database.

port

int

3306

The access port for this Managed Database.

region

str

us-east

The Region ID for the Managed Database.

replication_type

str

semi_synch

The replication method used for the Managed Database.

ssl_connection

bool

true

Whether to require SSL credentials to establish a connection to the Managed Database.

status

str

active

The operating status of the Managed Database.

total_disk_size_gb

int

15

The total disk size of the database in GB.

type

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

updated

str

2022-01-01T00:01:01

When this Managed Database was last updated.

used_disk_size_gb

int

2

The used space of the database in GB.

version

str

8.0.26

The Managed Database engine version.

hosts

Name

Type

Example

Description

hosts.primary

str

lin-123-456-…linodedb.net

The primary host for the Managed Database.

hosts.secondary

str

lin-123-456-…linodedb.net

The secondary/private network host for the Managed Database.

updates

Name

Type

Example

Description

updates.day_of_week

int

1

The day to perform maintenance.

updates.duration

int

3

The maximum maintenance window time in hours.

updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

updates.week_of_month

int

N/A

The week of the month to perform monthly frequency updates.


mysql-create

Provision a Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-create [-h] [--type type]
    [--label label] [--allow_list allow_list]
    [--encrypted encrypted] [--cluster_size cluster_size]
    [--replication_type replication_type]
    [--ssl_connection ssl_connection] [--region region]
    [--engine engine]

Sample

Examples of how this command might be used.

linode-cli databases mysql-create \
    --label example-db1 \
    --region us-east \
    --type g6-dedicated-2 \
    --cluster_size 3 \
    --engine mysql/8.0.26 \
    --encrypted false \
    --ssl_connection false \
    --replication_type semi_synch \
    --allow_list 203.0.113.1 \
    --allow_list 192.0.1.0/24

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--engine *

str

mysql/8.0.26

The Managed Database engine in engine/version format.

--label *

str

example-db

A unique, user-defined string referring to the Managed Database.

--region *

str

us-east

The Region ID for the Managed Database.

--type *

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

--allow_list

[]str

203.0.113.1/32

A list of IP addresses that can access the Managed Database.

--cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

--encrypted

bool

N/A

Whether the Managed Databases is encrypted.

--replication_type

str

semi_synch

The replication method used for the Managed Database.

--ssl_connection

bool

true

Whether to require SSL credentials to establish a connection to the Managed Database.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

allow_list

[]str

[“203.0.113….2.0.1.0/24”]

A list of IP addresses that can access the Managed Database.

cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

created

str

2022-01-01T00:01:01

When this Managed Database was created.

encrypted

bool

N/A

Whether the Managed Databases is encrypted.

engine

str

mysql

The Managed Database engine type.

id

int

123

A unique ID that can be used to identify and reference the Managed Database.

label

str

example-db

A unique, user-defined string referring to the Managed Database.

port

int

3306

The access port for this Managed Database.

region

str

us-east

The Region ID for the Managed Database.

replication_type

str

semi_synch

The replication method used for the Managed Database.

ssl_connection

bool

true

Whether to require SSL credentials to establish a connection to the Managed Database.

status

str

active

The operating status of the Managed Database.

total_disk_size_gb

int

15

The total disk size of the database in GB.

type

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

updated

str

2022-01-01T00:01:01

When this Managed Database was last updated.

used_disk_size_gb

int

2

The used space of the database in GB.

version

str

8.0.26

The Managed Database engine version.

hosts

Name

Type

Example

Description

hosts.primary

str

lin-123-456-…linodedb.net

The primary host for the Managed Database.

hosts.secondary

str

lin-123-456-…linodedb.net

The secondary/private network host for the Managed Database.

updates

Name

Type

Example

Description

updates.day_of_week

int

1

The day to perform maintenance.

updates.duration

int

3

The maximum maintenance window time in hours.

updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

updates.week_of_month

int

N/A

The week of the month to perform monthly frequency updates.


mysql-update

Update a Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-update [-h] [--allow_list allow_list]
    [--label label] [--type type] [--updates.frequency frequency]
    [--updates.week_of_month week_of_month]
    [--updates.day_of_week day_of_week]
    [--updates.duration duration]
    [--updates.hour_of_day hour_of_day] instanceId

Sample

Examples of how this command might be used.

linode-cli databases mysql-update 123 \
    --label example-db \
    --allow_list 203.0.113.1 \
    --allow_list 192.0.1.0/24 \
    --type g6-standard-1 \
    --updates.frequency monthly \
    --updates.duration 3 \
    --updates.hour_of_day 12 \
    --updates.day_of_week 4 \
    --updates.week_of_month 3

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--allow_list

[]str

203.0.113.1/32

A list of IP addresses that can access the Managed Database.

--label

str

example-db

A unique, user-defined string referring to the Managed Database.

--type

str

g6-standard-1

Request re-sizing of your cluster to a Linode Type with more disk space.

--updates.day_of_week

int

1

The day to perform maintenance.

--updates.duration

int

3

The maximum maintenance window time in hours.

--updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

--updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

--updates.week_of_month

int

N/A

(nullable) The week of the month to perform monthly frequency updates.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

allow_list

[]str

[“203.0.113….2.0.1.0/24”]

A list of IP addresses that can access the Managed Database.

cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

created

str

2022-01-01T00:01:01

When this Managed Database was created.

encrypted

bool

N/A

Whether the Managed Databases is encrypted.

engine

str

mysql

The Managed Database engine type.

id

int

123

A unique ID that can be used to identify and reference the Managed Database.

label

str

example-db

A unique, user-defined string referring to the Managed Database.

port

int

3306

The access port for this Managed Database.

region

str

us-east

The Region ID for the Managed Database.

replication_type

str

semi_synch

The replication method used for the Managed Database.

ssl_connection

bool

true

Whether to require SSL credentials to establish a connection to the Managed Database.

status

str

active

The operating status of the Managed Database.

total_disk_size_gb

int

15

The total disk size of the database in GB.

type

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

updated

str

2022-01-01T00:01:01

When this Managed Database was last updated.

used_disk_size_gb

int

2

The used space of the database in GB.

version

str

8.0.26

The Managed Database engine version.

hosts

Name

Type

Example

Description

hosts.primary

str

lin-123-456-…linodedb.net

The primary host for the Managed Database.

hosts.secondary

str

lin-123-456-…linodedb.net

The secondary/private network host for the Managed Database.

updates

Name

Type

Example

Description

updates.day_of_week

int

1

The day to perform maintenance.

updates.duration

int

3

The maximum maintenance window time in hours.

updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

updates.week_of_month

int

N/A

The week of the month to perform monthly frequency updates.


mysql-delete

Remove a Managed MySQL Database from your Account.

Usage

The format accepted by this command.

linode-cli databases mysql-delete [-h] instanceId

Sample

Examples of how this command might be used.

linode-cli databases mysql-delete 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.


mysql-backup-view

Display information for a single backup for an accessible Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-backup-view [-h] [--created created]
    [--type type] [--order-by {created,type}] [--order {asc,desc}]
    instanceId backupId

Sample

Examples of how this command might be used.

linode-cli databases mysql-backup-view 123 456

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

backupId

int

The ID of the Managed MySQL Database backup.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2022-01-01T00:01:01

A time value given in a combined date and time format that represents when the database backup was created.

id

int

123

The ID of the database backup object.

label

str

Scheduled - 0…1 UTC-XcCRmI

The database backup’s label, for display purposes only.

type

str

auto

The type of database backup, determined by how the backup was created.


mysql-backup-delete

Delete a single backup for an accessible Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-backup-delete [-h] instanceId backupId

Sample

Examples of how this command might be used.

linode-cli databases mysql-backup-delete 123 456

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

backupId

int

The ID of the Managed MySQL Database backup.


mysql-backup-restore

Restore a backup to a Managed MySQL Database on your Account.

Usage

The format accepted by this command.

linode-cli databases mysql-backup-restore [-h] instanceId
    backupId

Sample

Examples of how this command might be used.

linode-cli databases mysql-backup-restore 123 456

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed MySQL Database.

backupId

int

The ID of the Managed MySQL Database backup.


mysql-backup-snapshot

Creates a snapshot backup of a Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-backup-snapshot [-h] [--label label]
    [--target target] instanceId

Sample

Examples of how this command might be used.

linode-cli databases mysql-backup-snapshot 123 \
    --label snapshot1 \
    --target primary

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--label *

str

db-snapshot

The label for the Database snapshot backup.

--target

str

primary

The Database cluster target.


mysql-backups-list

Display all backups for an accessible Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-backups-list [-h] [--created created]
    [--type type] [--order-by {created,type}] [--order {asc,desc}]
    instanceId

Sample

Examples of how this command might be used.

linode-cli databases mysql-backups-list 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Filterable Attributes

Arguments used to define a filter for response entries.

Name

Type

Description

--created

str

A time value given in a combined date and time format that represents when the database backup was created.

--type

str

The type of database backup, determined by how the backup was created.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2022-01-01T00:01:01

A time value given in a combined date and time format that represents when the database backup was created.

id

int

123

The ID of the database backup object.

label

str

Scheduled - 0…1 UTC-XcCRmI

The database backup’s label, for display purposes only.

type

str

auto

The type of database backup, determined by how the backup was created.


mysql-creds-view

Display the root username and password for an accessible Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-creds-view [-h] [--order-by {}]
    [--order {asc,desc}] instanceId

Sample

Examples of how this command might be used.

linode-cli databases mysql-creds-view 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

password

str

s3cur3P@ssw0rd

The randomly-generated root password for the Managed Database instance.

username

str

linroot

The root username for the Managed Database instance.


mysql-creds-reset

Reset the root password for a Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-creds-reset [-h] instanceId

Sample

Examples of how this command might be used.

linode-cli databases mysql-creds-reset 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed MySQL Database.


mysql-patch

Apply security patches and updates to the underlying operating system of the Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-patch [-h] instanceId

Sample

Examples of how this command might be used.

linode-cli databases mysql-patch 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.


mysql-ssl-cert

Display the SSL CA certificate for an accessible Managed MySQL Database.

Usage

The format accepted by this command.

linode-cli databases mysql-ssl-cert [-h] [--order-by {}]
    [--order {asc,desc}] instanceId

Sample

Examples of how this command might be used.

linode-cli databases mysql-ssl-cert 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed MySQL Database.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

ca_certificate

str

LS0tLS1CRUdJ…==

The base64-encoded SSL CA certificate for the Managed Database instance.


postgresql-list

Display all accessible Managed PostgreSQL Databases.

Usage

The format accepted by this command.

linode-cli databases postgresql-list [-h] [--version version]
    [--type type] [--label label] [--engine engine]
    [--status status] [--region region]
    [--order-by {version,type,label,engine,status,region}]
    [--order {asc,desc}]

Sample

Examples of how this command might be used.

linode-cli databases postgresql-list

Filterable Attributes

Arguments used to define a filter for response entries.

Name

Type

Description

--engine

str

The Managed Database engine type.

--label

str

A unique, user-defined string referring to the Managed Database.

--region

str

The Region ID for the Managed Database.

--status

str

The operating status of the Managed Database.

--type

str

The Linode Instance type used by the Managed Database for its nodes.

--version

str

The Managed Database engine version.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

allow_list

[]str

[“203.0.113….2.0.1.0/24”]

A list of IP addresses that can access the Managed Database.

cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

created

str

2022-01-01T00:01:01

When this Managed Database was created.

encrypted

bool

N/A

Whether the Managed Databases is encrypted.

engine

str

postgresql

The Managed Database engine type.

id

int

123

A unique ID that can be used to identify and reference the Managed Database.

label

str

example-db

A unique, user-defined string referring to the Managed Database.

port

int

3306

The access port for this Managed Database.

region

str

us-east

The Region ID for the Managed Database.

replication_commit_type

str

local

The synchronization level of the replicating server.

replication_type

str

async

The replication method used for the Managed Database.

ssl_connection

bool

true

Whether to require SSL credentials to establish a connection to the Managed Database.

status

str

active

The operating status of the Managed Database.

total_disk_size_gb

int

15

The total disk size of the database in GB.

type

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

updated

str

2022-01-01T00:01:01

When this Managed Database was last updated.

used_disk_size_gb

int

2

The used space of the database in GB.

version

str

13.2

The Managed Database engine version.

hosts

Name

Type

Example

Description

hosts.primary

str

lin-0000-000-…linodedb.net

The primary host for the Managed Database.

hosts.secondary

str

lin-0000-000-…linodedb.net

The secondary/private network host for the Managed Database.

updates

Name

Type

Example

Description

updates.day_of_week

int

1

The day to perform maintenance.

updates.duration

int

3

The maximum maintenance window time in hours.

updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

updates.week_of_month

int

N/A

The week of the month to perform monthly frequency updates.


postgresql-view

Display information for a single, accessible Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-view [-h] [--region region]
    [--status status] [--engine engine] [--version version]
    [--label label] [--type type]
    [--order-by {region,status,engine,version,label,type}]
    [--order {asc,desc}] instanceId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-view 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

allow_list

[]str

[“203.0.113….2.0.1.0/24”]

A list of IP addresses that can access the Managed Database.

cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

created

str

2022-01-01T00:01:01

When this Managed Database was created.

encrypted

bool

N/A

Whether the Managed Databases is encrypted.

engine

str

postgresql

The Managed Database engine type.

id

int

123

A unique ID that can be used to identify and reference the Managed Database.

label

str

example-db

A unique, user-defined string referring to the Managed Database.

port

int

3306

The access port for this Managed Database.

region

str

us-east

The Region ID for the Managed Database.

replication_commit_type

str

local

The synchronization level of the replicating server.

replication_type

str

async

The replication method used for the Managed Database.

ssl_connection

bool

true

Whether to require SSL credentials to establish a connection to the Managed Database.

status

str

active

The operating status of the Managed Database.

total_disk_size_gb

int

15

The total disk size of the database in GB.

type

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

updated

str

2022-01-01T00:01:01

When this Managed Database was last updated.

used_disk_size_gb

int

2

The used space of the database in GB.

version

str

13.2

The Managed Database engine version.

hosts

Name

Type

Example

Description

hosts.primary

str

lin-0000-000-…linodedb.net

The primary host for the Managed Database.

hosts.secondary

str

lin-0000-000-…linodedb.net

The secondary/private network host for the Managed Database.

updates

Name

Type

Example

Description

updates.day_of_week

int

1

The day to perform maintenance.

updates.duration

int

3

The maximum maintenance window time in hours.

updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

updates.week_of_month

int

N/A

The week of the month to perform monthly frequency updates.


postgresql-create

Provision a Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-create [-h] [--region region]
    [--engine engine]
    [--replication_commit_type replication_commit_type]
    [--ssl_connection ssl_connection]
    [--cluster_size cluster_size]
    [--replication_type replication_type] [--encrypted encrypted]
    [--allow_list allow_list] [--type type] [--label label]

Sample

Examples of how this command might be used.

linode-cli databases postgresql-create \
    --label example-db \
    --region us-east \
    --type g6-dedicated-2 \
    --cluster_size 3 \
    --engine postgresql/13.2 \
    --encrypted false \
    --ssl_connection false \
    --replication_type asynch \
    --replication_commit_type local \
    --allow_list 203.0.113.1 \
    --allow_list 192.0.1.0/24

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--engine *

str

postgresql/13.2

The Managed Database engine in engine/version format.

--label *

str

example-db

A unique, user-defined string referring to the Managed Database.

--region *

str

us-east

The Region ID for the Managed Database.

--type *

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

--allow_list

[]str

203.0.113.1/32

A list of IP addresses that can access the Managed Database.

--cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

--encrypted

bool

N/A

Whether the Managed Databases is encrypted.

--replication_commit_type

str

local

The synchronization level of the replicating server.

--replication_type

str

async

The replication method used for the Managed Database.

--ssl_connection

bool

true

Whether to require SSL credentials to establish a connection to the Managed Database.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

allow_list

[]str

[“203.0.113….2.0.1.0/24”]

A list of IP addresses that can access the Managed Database.

cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

created

str

2022-01-01T00:01:01

When this Managed Database was created.

encrypted

bool

N/A

Whether the Managed Databases is encrypted.

engine

str

postgresql

The Managed Database engine type.

id

int

123

A unique ID that can be used to identify and reference the Managed Database.

label

str

example-db

A unique, user-defined string referring to the Managed Database.

port

int

3306

The access port for this Managed Database.

region

str

us-east

The Region ID for the Managed Database.

replication_commit_type

str

local

The synchronization level of the replicating server.

replication_type

str

async

The replication method used for the Managed Database.

ssl_connection

bool

true

Whether to require SSL credentials to establish a connection to the Managed Database.

status

str

active

The operating status of the Managed Database.

total_disk_size_gb

int

15

The total disk size of the database in GB.

type

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

updated

str

2022-01-01T00:01:01

When this Managed Database was last updated.

used_disk_size_gb

int

2

The used space of the database in GB.

version

str

13.2

The Managed Database engine version.

hosts

Name

Type

Example

Description

hosts.primary

str

lin-0000-000-…linodedb.net

The primary host for the Managed Database.

hosts.secondary

str

lin-0000-000-…linodedb.net

The secondary/private network host for the Managed Database.

updates

Name

Type

Example

Description

updates.day_of_week

int

1

The day to perform maintenance.

updates.duration

int

3

The maximum maintenance window time in hours.

updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

updates.week_of_month

int

N/A

The week of the month to perform monthly frequency updates.


postgresql-update

Update a Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-update [-h]
    [--allow_list allow_list] [--type type] [--label label]
    [--updates.hour_of_day hour_of_day]
    [--updates.duration duration] [--updates.frequency frequency]
    [--updates.week_of_month week_of_month]
    [--updates.day_of_week day_of_week] instanceId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-update 123 \
    --label example-db \
    --allow_list 203.0.113.1 \
    --allow_list 192.0.1.0/24 \
    --type g6-standard-1 \
    --updates.frequency monthly \
    --updates.duration 3 \
    --updates.hour_of_day 12 \
    --updates.day_of_week 4 \
    --updates.week_of_month 3

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--allow_list

[]str

203.0.113.1/32

A list of IP addresses that can access the Managed Database.

--label

str

example-db

A unique, user-defined string referring to the Managed Database.

--type

str

g6-standard-1

Request re-sizing of your cluster to a Linode Type with more disk space.

--updates.day_of_week

int

1

The day to perform maintenance.

--updates.duration

int

3

The maximum maintenance window time in hours.

--updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

--updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

--updates.week_of_month

int

N/A

(nullable) The week of the month to perform monthly frequency updates.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

allow_list

[]str

[“203.0.113….2.0.1.0/24”]

A list of IP addresses that can access the Managed Database.

cluster_size

int

3

The number of Linode Instance nodes deployed to the Managed Database.

created

str

2022-01-01T00:01:01

When this Managed Database was created.

encrypted

bool

N/A

Whether the Managed Databases is encrypted.

engine

str

postgresql

The Managed Database engine type.

id

int

123

A unique ID that can be used to identify and reference the Managed Database.

label

str

example-db

A unique, user-defined string referring to the Managed Database.

port

int

3306

The access port for this Managed Database.

region

str

us-east

The Region ID for the Managed Database.

replication_commit_type

str

local

The synchronization level of the replicating server.

replication_type

str

async

The replication method used for the Managed Database.

ssl_connection

bool

true

Whether to require SSL credentials to establish a connection to the Managed Database.

status

str

active

The operating status of the Managed Database.

total_disk_size_gb

int

15

The total disk size of the database in GB.

type

str

g6-dedicated-2

The Linode Instance type used by the Managed Database for its nodes.

updated

str

2022-01-01T00:01:01

When this Managed Database was last updated.

used_disk_size_gb

int

2

The used space of the database in GB.

version

str

13.2

The Managed Database engine version.

hosts

Name

Type

Example

Description

hosts.primary

str

lin-0000-000-…linodedb.net

The primary host for the Managed Database.

hosts.secondary

str

lin-0000-000-…linodedb.net

The secondary/private network host for the Managed Database.

updates

Name

Type

Example

Description

updates.day_of_week

int

1

The day to perform maintenance.

updates.duration

int

3

The maximum maintenance window time in hours.

updates.frequency

str

weekly

Whether maintenance occurs on a weekly or monthly basis.

updates.hour_of_day

int

N/A

The hour to begin maintenance based in UTC time.

updates.week_of_month

int

N/A

The week of the month to perform monthly frequency updates.


postgresql-delete

Remove a Managed PostgreSQL Database from your Account.

Usage

The format accepted by this command.

linode-cli databases postgresql-delete [-h] instanceId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-delete 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.


postgresql-backup-view

Display information for a single backup for an accessible Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-backup-view [-h] [--type type]
    [--created created] [--order-by {type,created}]
    [--order {asc,desc}] instanceId backupId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-backup-view 123 456

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

backupId

int

The ID of the Managed PostgreSQL Database backup.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2022-01-01T00:01:01

A time value given in a combined date and time format that represents when the database backup was created.

id

int

123

The ID of the database backup object.

label

str

Scheduled - 0…1 UTC-XcCRmI

The database backup’s label, for display purposes only.

type

str

auto

The type of database backup, determined by how the backup was created.


postgresql-backup-delete

Delete a single backup for an accessible Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-backup-delete [-h] instanceId
    backupId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-backup-delete 123 456

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

backupId

int

The ID of the Managed PostgreSQL Database backup.


postgresql-backup-restore

Restore a backup to a Managed PostgreSQL Database on your Account.

Usage

The format accepted by this command.

linode-cli databases postgresql-backup-restore [-h] instanceId
    backupId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-backup-restore 123 456

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

backupId

int

The ID of the Managed PostgreSQL Database backup.


postgresql-backup-snapshot

Creates a snapshot backup of a Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-backup-snapshot [-h]
    [--target target] [--label label] instanceId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-backup-snapshot 123 \
    --label snapshot1 \
    --target primary

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--label *

str

db-snapshot

The label for the Database snapshot backup.

--target

str

primary

The Database cluster target.


postgresql-backups-list

Display all backups for an accessible Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-backups-list [-h] [--type type]
    [--created created] [--order-by {type,created}]
    [--order {asc,desc}] instanceId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-backups-list 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Filterable Attributes

Arguments used to define a filter for response entries.

Name

Type

Description

--created

str

A time value given in a combined date and time format that represents when the database backup was created.

--type

str

The type of database backup, determined by how the backup was created.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2022-01-01T00:01:01

A time value given in a combined date and time format that represents when the database backup was created.

id

int

123

The ID of the database backup object.

label

str

Scheduled - 0…1 UTC-XcCRmI

The database backup’s label, for display purposes only.

type

str

auto

The type of database backup, determined by how the backup was created.


postgresql-creds-view

Display the root username and password for an accessible Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-creds-view [-h] [--order-by {}]
    [--order {asc,desc}] instanceId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-creds-view 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

password

str

s3cur3P@ssw0rd

The randomly-generated root password for the Managed Database instance.

username

str

linroot

The root username for the Managed Database instance.


postgresql-creds-reset

Reset the root password for a Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-creds-reset [-h] instanceId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-creds-reset 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.


postgresql-patch

Apply security patches and updates to the underlying operating system of the Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-patch [-h] instanceId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-patch 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.


postgresql-ssl-cert

Display the SSL CA certificate for an accessible Managed PostgreSQL Database.

Usage

The format accepted by this command.

linode-cli databases postgresql-ssl-cert [-h] [--order-by {}]
    [--order {asc,desc}] instanceId

Sample

Examples of how this command might be used.

linode-cli databases postgresql-ssl-cert 123

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

instanceId

int

The ID of the Managed PostgreSQL Database.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

ca_certificate

str

LS0tLS1CRUdJ…==

The base64-encoded SSL CA certificate for the Managed Database instance.

type-view

Display the details of a single Managed Database type.

Usage

The format accepted by this command.

linode-cli databases type-view [-h] [--order-by {}]
    [--order {asc,desc}] typeId

Sample

Examples of how this command might be used.

linode-cli databases type-view g6-nanode-1

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

typeId

str

The ID of the Managed Database type.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

_split

str

N/A

N/A

id

str

N/A

N/A

label

str

N/A

N/A

engines

Name

Type

Example

Description

engines.price.hourly

str

N/A

N/A

engines.price.monthly

str

N/A

N/A

engines.quantity

str

N/A

N/A