Managed Databases v4.176.0
Managed Database Engines List
This command is currently only available for customers who already have an active Managed Database.
Display all available Managed Database engine types and versions. Engine IDs are used when creating new Managed Databases.
Authorizations
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl https://api.linode.com/v4/databases/engines/
linode-cli databases engines
Response Samples
{
"data": [
{
"engine": "mysql",
"id": "mysql/8.0.26",
"total_disk_size_gb": 15,
"used_disk_size_gb": 2,
"version": "8.0.26"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||
page | integer The current page. | ||||||||||
pages | integer The total number of pages. | ||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed Database Engine View
This command is currently only available for customers who already have an active Managed Database.
Display information for a single Managed Database engine type and version.
Authorizations
Path Parameters
engineId | string RequiredThe ID of the Managed Database engine. |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl https://api.linode.com/v4/databases/engines/mysql/5.7.30
linode-cli databases engine-view mysql/5.7.30
Response Samples
{
"engine": "mysql",
"id": "mysql/8.0.26",
"total_disk_size_gb": 15,
"used_disk_size_gb": 2,
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
engine | string The Managed Database engine type. |
id | string The Managed Database engine ID in engine/version format. |
total_disk_size_gb | integer The total disk size of the database in GB. |
used_disk_size_gb | integer The used space of the database in GB. |
version | string The Managed Database engine version. |
errors | array
of objects
|
Managed Databases List All
This command is currently only available for customers who already have an active Managed Database.
Display all Managed Databases that are accessible by your User, regardless of engine type.
For more detailed information on a particular Database instance, make a request to its instance_uri
.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/instances
linode-cli databases list
Response Samples
{
"data": [
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"instance_uri": "/v4/databases/mysql/instances/123",
"label": "example-db",
"region": "us-east",
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "8.0.26"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed MySQL Databases List
This command is currently only available for customers who already have an active Managed Database.
Display all accessible Managed MySQL Databases.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/
linode-cli databases mysql-list
Response Samples
{
"data": [
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "8.0.26"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed MySQL Database Create
This command is currently only available for customers who already have an active Managed Database.
Provision a Managed MySQL Database.
Restricted Users must have the add_databases
grant to use this command.
New instances can take approximately 15 to 30 minutes to provision.
The allow_list
is used to control access to the Managed Database.
IP addresses and ranges in this list can access the Managed Database. All other sources are blocked.
If
0.0.0.0/0
is a value in this list, then all IP addresses can access the Managed Database.Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database.
All Managed Databases include automatic, daily backups. Up to seven backups are automatically stored for each Managed Database, providing restore points for each day of the past week.
All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed MySQL Database during configurable maintenance windows.
If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
To modify update the maintenance window for a Database, use the Managed MySQL Database Update ( PUT /databases/mysql/instances/{instanceId}) command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "example-db",
"region": "us-east",
"type": "g6-dedicated-2",
"cluster_size": 3,
"engine": "mysql/8.0.26",
"encrypted": false,
"ssl_connection": true,
"replication_type": "semi_synch",
"allow_list": [
"203.0.113.1",
"192.0.1.0/24"
]
}' \
https://api.linode.com/v4/databases/mysql/instances
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
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If |
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. |
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. |
engine Required | string The Managed Database engine in engine/version format. |
label Required | string
3..32
charactersA unique, user-defined string referring to the Managed Database. |
region Required | string The Region ID for the Managed Database. |
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be |
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed MySQL Database Credentials View ( GET /databases/mysql/instances/{instanceId}/credentials) command for access information. |
type Required | string The Linode Instance type used by the Managed Database for its nodes. |
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. | ||||||||||
engine | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region | string The Region ID for the Managed Database. | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed MySQL Database Credentials View ( GET /databases/mysql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
total_disk_size_gb | integer The total disk size of the database in GB. | ||||||||||
type | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
used_disk_size_gb | integer The used space of the database in GB. | ||||||||||
version | string The Managed Database engine version. |
errors | array
of objects
|
Managed MySQL Database Delete
This command is currently only available for customers who already have an active Managed Database.
Remove a Managed MySQL Database from your Account.
Requires read_write
access to the Database.
The Database must have an active
, failed
, or degraded
status to perform this command.
Only unrestricted Users can access this command, and have access regardless of the acting token’s OAuth scopes.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/mysql/instances/123
linode-cli databases mysql-delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database View
This command is currently only available for customers who already have an active Managed Database.
Display information for a single, accessible Managed MySQL Database.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123
linode-cli databases mysql-view 123
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. | ||||||||||
engine | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region | string The Region ID for the Managed Database. | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed MySQL Database Credentials View ( GET /databases/mysql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
total_disk_size_gb | integer The total disk size of the database in GB. | ||||||||||
type | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
used_disk_size_gb | integer The used space of the database in GB. | ||||||||||
version | string The Managed Database engine version. |
errors | array
of objects
|
Managed MySQL Database Update
This command is currently only available for customers who already have an active Managed Database.
Update a Managed MySQL Database.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Updating addresses in the allow_list
overwrites any existing addresses.
IP addresses and ranges in this list can access the Managed Database. All other sources are blocked.
If
0.0.0.0/0
is a value in this list, then all IP addresses can access the Managed Database.Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database.Note: Updates to the
allow_list
may take a short period of time to complete, making this command inappropriate for rapid successive updates to this property.
All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed MySQL Database. The maintenance window for these updates is configured with the Managed Database’s updates
property.
If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "example-db",
"allow_list": [
"203.0.113.1",
"192.0.1.0/24"
],
"type": "g6-standard-1",
"updates": {
"frequency": "monthly",
"duration": 3,
"hour_of_day": 12,
"day_of_week": 4,
"week_of_month": 3
}
}' \
https://api.linode.com/v4/databases/mysql/instances/123
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
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
type | string Request re-sizing of your cluster to a Linode Type with more disk space. For example, you could request a Linode Type that uses a higher plan.
| ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
|
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. | ||||||||||
engine | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region | string The Region ID for the Managed Database. | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed MySQL Database Credentials View ( GET /databases/mysql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
total_disk_size_gb | integer The total disk size of the database in GB. | ||||||||||
type | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
used_disk_size_gb | integer The used space of the database in GB. | ||||||||||
version | string The Managed Database engine version. |
errors | array
of objects
|
Managed MySQL Database Backups List
This command is currently only available for customers who already have an active Managed Database.
Display all backups for an accessible Managed MySQL Database.
The Database must not be provisioning to perform this command.
Database auto
type backups are created every 24 hours at 0:00 UTC. Each auto
backup is retained for 7 days.
Database snapshot
type backups are created by accessing the Managed MySQL Database Backup Snapshot Create (
POST /databases/mysql/instances/{instanceId}/backups) command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123/backups
linode-cli databases mysql-backups-list 123
Response Samples
{
"data": [
{
"created": "2022-01-01T00:01:01",
"id": 123,
"label": "Scheduled - 02/04/22 11:11 UTC-XcCRmI",
"type": "auto"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||
page | integer The current page. | ||||||||
pages | integer The total number of pages. | ||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed MySQL Database Backup Snapshot Create
This command is currently only available for customers who already have an active Managed Database.
Creates a snapshot backup of a Managed MySQL Database.
Requires read_write
access to the Database.
Up to 3 snapshot backups for each Database can be stored at a time. If 3 snapshots have been created for a Database, one must be deleted before another can be made.
Backups generated by this command have the type snapshot
. Snapshot backups may take several minutes to complete, after which they will be accessible to view or restore.
The Database must have an active
status to perform this command. If another backup is in progress, it must complete before a new backup can be initiated.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-X POST -d '{
"label": "snapshot1",
"target": "primary"
}' \
https://api.linode.com/v4/databases/mysql/instances/123/backups/
linode-cli databases mysql-backup-snapshot 123 \
--label snapshot1 \
--target primary
Request Body Schema
label Required | string
1..30
charactersThe label for the Database snapshot backup.
|
target | string Enum:
primary
secondary
Default:
primary The Database cluster target.
If the Database is a high availability cluster, choosing |
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database Backup Delete
This command is currently only available for customers who already have an active Managed Database.
Delete a single backup for an accessible Managed MySQL Database.
Requires read_write
access to the Database.
The Database must not be provisioning to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
backupId | integer RequiredThe ID of the Managed MySQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/mysql/instances/123/backups/456
linode-cli databases mysql-backup-delete 123 456
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database Backup View
This command is currently only available for customers who already have an active Managed Database.
Display information for a single backup for an accessible Managed MySQL Database.
The Database must not be provisioning to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
backupId | integer RequiredThe ID of the Managed MySQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123/backups/456
linode-cli databases mysql-backup-view 123 456
Response Samples
{
"created": "2022-01-01T00:01:01",
"id": 123,
"label": "Scheduled - 02/04/22 11:11 UTC-XcCRmI",
"type": "auto"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> A time value given in a combined date and time format that represents when the database backup was created. |
id | integer The ID of the database backup object. |
label | string
<=
30
charactersThe database backup’s label, for display purposes only. Must include only ASCII letters or numbers. |
type | string Enum:
snapshot
auto The type of database backup, determined by how the backup was created. |
errors | array
of objects
|
Managed MySQL Database Backup Restore
This command is currently only available for customers who already have an active Managed Database.
Restore a backup to a Managed MySQL Database on your Account.
Requires read_write
access to the Database.
The Database must have an active
, degraded
, or failed
status to perform this command.
Note: Restoring from a backup will erase all existing data on the database instance and replace it with backup data.
Note: Currently, restoring a backup after resetting Managed Database credentials results in a failed cluster. Please contact Customer Support if this occurs.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
backupId | integer RequiredThe ID of the Managed MySQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/mysql/instances/123/backups/456/restore
linode-cli databases mysql-backup-restore 123 456
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database Credentials View
This command is currently only available for customers who already have an active Managed Database.
Display the root username and password for an accessible Managed MySQL Database.
The Database must have an active
status to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123/credentials/
linode-cli databases mysql-creds-view 123
Response Samples
{
"password": "s3cur3P@ssw0rd",
"username": "linroot"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
password | string The randomly-generated root password for the Managed Database instance. |
username | string The root username for the Managed Database instance. |
errors | array
of objects
|
Managed MySQL Database Credentials Reset
This command is currently only available for customers who already have an active Managed Database.
Reset the root password for a Managed MySQL Database.
Requires read_write
access to the Database.
A new root password is randomly generated and accessible with the Managed MySQL Database Credentials View ( GET /databases/mysql/instances/{instanceId}/credentials) command.
Only unrestricted Users can access this command, and have access regardless of the acting token’s OAuth scopes.
Note: Note that it may take several seconds for credentials to reset.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/mysql/instances/123/credentials/reset
linode-cli databases mysql-creds-reset 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database Patch
This command is currently only available for customers who already have an active Managed Database.
Apply security patches and updates to the underlying operating system of the Managed MySQL Database. This function runs during regular maintenance windows, which are configurable with the Managed MySQL Database Update ( PUT /databases/mysql/instances/{instanceId}) command.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Note
If your database cluster is configured with a single node, you will experience downtime during this maintenance. Consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/mysql/instances/123/patch
linode-cli databases mysql-patch 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database SSL Certificate View
This command is currently only available for customers who already have an active Managed Database.
Display the SSL CA certificate for an accessible Managed MySQL Database.
The Database must have an active
status to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123/ssl
linode-cli databases mysql-ssl-cert 123
Response Samples
{
"ca_certificate": "LS0tLS1CRUdJ...=="
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
ca_certificate | string<base64> The base64-encoded SSL CA certificate for the Managed Database instance. |
errors | array
of objects
|
Managed PostgreSQL Databases List
This command is currently only available for customers who already have an active Managed Database.
Display all accessible Managed PostgreSQL Databases.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/
linode-cli databases postgresql-list
Response Samples
{
"data": [
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "postgresql",
"hosts": {
"primary": "lin-0000-000-pgsql-primary.servers.linodedb.net",
"secondary": "lin-0000-000-pgsql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_commit_type": "local",
"replication_type": "async",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "13.2"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed PostgreSQL Database Create
This command is currently only available for customers who already have an active Managed Database.
Provision a Managed PostgreSQL Database.
Restricted Users must have the add_databases
grant to use this command.
New instances can take approximately 15 to 30 minutes to provision.
The allow_list
is used to control access to the Managed Database.
IP addresses and ranges in this list can access the Managed Database. All other sources are blocked.
If
0.0.0.0/0
is a value in this list, then all IP addresses can access the Managed Database.Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database.
All Managed Databases include automatic, daily backups. Up to seven backups are automatically stored for each Managed Database, providing restore points for each day of the past week.
All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed PostgreSQL Database during configurable maintenance windows.
If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
To modify update the maintenance window for a Database, use the Managed PostgreSQL Database Update ( PUT /databases/postgresql/instances/{instanceId}) command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Request Samples
curl -H "Content-Type: application/json" \ -H "Authorization: Bearer $TOKEN" \ -X POST -d '{
"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",
"192.0.1.0/24"
]
}' \ https://api.linode.com/v4/databases/postgresql/instances
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
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If |
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. |
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. |
engine Required | string The Managed Database engine in engine/version format. |
label Required | string
3..32
charactersA unique, user-defined string referring to the Managed Database. |
region Required | string The Region ID for the Managed Database. |
replication_commit_type | string Enum:
on
local
remote_write
remote_apply
off
Default:
local The synchronization level of the replicating server. Must be |
replication_type | string Enum:
none
asynch The replication method used for the Managed Database. Defaults to Must be Must be |
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed PostgreSQL Database Credentials View ( GET /databases/postgresql/instances/{instanceId}/credentials) command for access information. |
type Required | string The Linode Instance type used by the Managed Database for its nodes. |
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "postgresql",
"hosts": {
"primary": "lin-0000-000-pgsql-primary.servers.linodedb.net",
"secondary": "lin-0000-000-pgsql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_commit_type": "local",
"replication_type": "async",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "13.2"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. | ||||||||||
engine | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region | string The Region ID for the Managed Database. | ||||||||||
replication_commit_type | string Enum:
on
local
remote_write
remote_apply
off
Default:
local The synchronization level of the replicating server. Must be | ||||||||||
replication_type | string Enum:
none
asynch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed PostgreSQL Database Credentials View ( GET /databases/postgresql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
total_disk_size_gb | integer The total disk size of the database in GB. | ||||||||||
type | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
used_disk_size_gb | integer The used space of the database in GB. | ||||||||||
version | string The Managed Database engine version. |
errors | array
of objects
|
Managed PostgreSQL Database Delete
This command is currently only available for customers who already have an active Managed Database.
Remove a Managed PostgreSQL Database from your Account.
Requires read_write
access to the Database.
The Database must have an active
, failed
, or degraded
status to perform this command.
Only unrestricted Users can access this command, and have access regardless of the acting token’s OAuth scopes.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/postgresql/instances/123
linode-cli databases postgresql-delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database View
This command is currently only available for customers who already have an active Managed Database.
Display information for a single, accessible Managed PostgreSQL Database.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/123
linode-cli databases postgresql-view 123
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "postgresql",
"hosts": {
"primary": "lin-0000-000-pgsql-primary.servers.linodedb.net",
"secondary": "lin-0000-000-pgsql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_commit_type": "local",
"replication_type": "async",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "13.2"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. | ||||||||||
engine | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region | string The Region ID for the Managed Database. | ||||||||||
replication_commit_type | string Enum:
on
local
remote_write
remote_apply
off
Default:
local The synchronization level of the replicating server. Must be | ||||||||||
replication_type | string Enum:
none
asynch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed PostgreSQL Database Credentials View ( GET /databases/postgresql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
total_disk_size_gb | integer The total disk size of the database in GB. | ||||||||||
type | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
used_disk_size_gb | integer The used space of the database in GB. | ||||||||||
version | string The Managed Database engine version. |
errors | array
of objects
|
Managed PostgreSQL Database Update
This command is currently only available for customers who already have an active Managed Database.
Update a Managed PostgreSQL Database.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Updating addresses in the allow_list
overwrites any existing addresses.
IP addresses and ranges in this list can access the Managed Database. All other sources are blocked.
If
0.0.0.0/0
is a value in this list, then all IP addresses can access the Managed Database.Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database.Note: Updates to the
allow_list
may take a short period of time to complete, making this command inappropriate for rapid successive updates to this property.
All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed PostgreSQL Database. The maintenance window for these updates is configured with the Managed Database’s updates
property.
If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "example-db",
"allow_list": [
"203.0.113.1",
"192.0.1.0/24"
],
"type": "g6-standard-1",
"updates": {
"frequency": "monthly",
"duration": 3,
"hour_of_day": 12,
"day_of_week": 4,
"week_of_month": 3
}
}' \
https://api.linode.com/v4/databases/postgresql/instances/123
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
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
type | string Request re-sizing of your cluster to a Linode Type with more disk space. For example, you could request a Linode Type that uses a higher plan.
| ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
|
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "postgresql",
"hosts": {
"primary": "lin-0000-000-pgsql-primary.servers.linodedb.net",
"secondary": "lin-0000-000-pgsql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_commit_type": "local",
"replication_type": "async",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "13.2"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. | ||||||||||
engine | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region | string The Region ID for the Managed Database. | ||||||||||
replication_commit_type | string Enum:
on
local
remote_write
remote_apply
off
Default:
local The synchronization level of the replicating server. Must be | ||||||||||
replication_type | string Enum:
none
asynch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed PostgreSQL Database Credentials View ( GET /databases/postgresql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
total_disk_size_gb | integer The total disk size of the database in GB. | ||||||||||
type | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
used_disk_size_gb | integer The used space of the database in GB. | ||||||||||
version | string The Managed Database engine version. |
errors | array
of objects
|
Managed PostgreSQL Database Backups List
This command is currently only available for customers who already have an active Managed Database.
Display all backups for an accessible Managed PostgreSQL Database.
The Database must not be provisioning to perform this command.
Database auto
type backups are created every 24 hours at 0:00 UTC. Each auto
backup is retained for 7 days.
Database snapshot
type backups are created by accessing the Managed PostgreSQL Database Backup Snapshot Create (
POST /databases/postgresql/instances/{instanceId}/backups) command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/123/backups
linode-cli databases postgresql-backups-list 123
Response Samples
{
"data": [
{
"created": "2022-01-01T00:01:01",
"id": 123,
"label": "Scheduled - 02/04/22 11:11 UTC-XcCRmI",
"type": "auto"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||
page | integer The current page. | ||||||||
pages | integer The total number of pages. | ||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed PostgreSQL Database Backup Snapshot Create
This command is currently only available for customers who already have an active Managed Database.
Creates a snapshot backup of a Managed PostgreSQL Database.
Requires read_write
access to the Database.
Up to 3 snapshot backups for each Database can be stored at a time. If 3 snapshots have been created for a Database, one must be deleted before another can be made.
Backups generated by this command have the type snapshot
. Snapshot backups may take several minutes to complete, after which they will be accessible to view or restore.
The Database must have an active
status to perform this command. If another backup is in progress, it must complete before a new backup can be initiated.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-X POST -d '{
"label": "snapshot1",
"target": "primary"
}' \
https://api.linode.com/v4/databases/postgresql/instances/123/backups/
linode-cli databases postgresql-backup-snapshot 123 \
--label snapshot1 \
--target primary
Request Body Schema
label Required | string
1..30
charactersThe label for the Database snapshot backup.
|
target | string Enum:
primary
secondary
Default:
primary The Database cluster target.
If the Database is a high availability cluster, choosing |
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database Backup Delete
This command is currently only available for customers who already have an active Managed Database.
Delete a single backup for an accessible Managed PostgreSQL Database.
Requires read_write
access to the Database.
The Database must not be provisioning to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
backupId | integer RequiredThe ID of the Managed PostgreSQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/postgresql/instances/123/backups/456
linode-cli databases postgresql-backup-delete 123 456
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database Backup View
This command is currently only available for customers who already have an active Managed Database.
Display information for a single backup for an accessible Managed PostgreSQL Database.
The Database must not be provisioning to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
backupId | integer RequiredThe ID of the Managed PostgreSQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/123/backups/456
linode-cli databases postgresql-backup-view 123 456
Response Samples
{
"created": "2022-01-01T00:01:01",
"id": 123,
"label": "Scheduled - 02/04/22 11:11 UTC-XcCRmI",
"type": "auto"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> A time value given in a combined date and time format that represents when the database backup was created. |
id | integer The ID of the database backup object. |
label | string
<=
30
charactersThe database backup’s label, for display purposes only. Must include only ASCII letters or numbers. |
type | string Enum:
snapshot
auto The type of database backup, determined by how the backup was created. |
errors | array
of objects
|
Managed PostgreSQL Database Backup Restore
This command is currently only available for customers who already have an active Managed Database.
Restore a backup to a Managed PostgreSQL Database on your Account.
Requires read_write
access to the Database.
The Database must have an active
, degraded
, or failed
status to perform this command.
Note: Restoring from a backup will erase all existing data on the database instance and replace it with backup data.
Note: Currently, restoring a backup after resetting Managed Database credentials results in a failed cluster. Please contact Customer Support if this occurs.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
backupId | integer RequiredThe ID of the Managed PostgreSQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/postgresql/instances/123/backups/456/restore
linode-cli databases postgresql-backup-restore 123 456
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database Credentials View
This command is currently only available for customers who already have an active Managed Database.
Display the root username and password for an accessible Managed PostgreSQL Database.
The Database must have an active
status to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/123/credentials/
linode-cli databases postgresql-creds-view 123
Response Samples
{
"password": "s3cur3P@ssw0rd",
"username": "linroot"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
password | string The randomly-generated root password for the Managed Database instance. |
username | string The root username for the Managed Database instance. |
errors | array
of objects
|
Managed PostgreSQL Database Credentials Reset
This command is currently only available for customers who already have an active Managed Database.
Reset the root password for a Managed PostgreSQL Database.
Requires read_write
access to the Database.
A new root password is randomly generated and accessible with the Managed PostgreSQL Database Credentials View ( GET /databases/postgresql/instances/{instanceId}/credentials) command.
Only unrestricted Users can access this command, and have access regardless of the acting token’s OAuth scopes.
Note: Note that it may take several seconds for credentials to reset.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/postgresql/instances/123/credentials/reset
linode-cli databases postgresql-creds-reset 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database Patch
This command is currently only available for customers who already have an active Managed Database.
Apply security patches and updates to the underlying operating system of the Managed PostgreSQL Database. This function runs during regular maintenance windows, which are configurable with the Managed PostgreSQL Database Update ( PUT /databases/postgresql/instances/{instanceId}) command.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Note
If your database cluster is configured with a single node, you will experience downtime during this maintenance. Consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/postgresql/instances/123/patch
linode-cli databases postgresql-patch 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database SSL Certificate View
This command is currently only available for customers who already have an active Managed Database.
Display the SSL CA certificate for an accessible Managed PostgreSQL Database.
The Database must have an active
status to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/123/ssl
linode-cli databases postgresql-ssl-cert 123
Response Samples
{
"ca_certificate": "LS0tLS1CRUdJ...=="
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
ca_certificate | string<base64> The base64-encoded SSL CA certificate for the Managed Database instance. |
errors | array
of objects
|
Managed Database Types List
This command is currently only available for customers who already have an active Managed Database.
Display all Managed Database node types. The type and number of nodes determine the resources and price of a Managed Database instance.
Each Managed Database can have one node type. In the case of a high availability Database, all nodes are provisioned according to the chosen type.
Authorizations
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl https://api.linode.com/v4/databases/types
linode-cli databases types
Response Samples
{
"data": [
{
"class": "nanode",
"deprecated": false,
"disk": 25600,
"engines": {
"mysql": [
{
"price": {
"hourly": 0.03,
"monthly": 20
},
"quantity": 1
}
],
"postgresql": [
{
"price": {
"hourly": 0.03,
"monthly": 20
},
"quantity": 1
}
]
},
"id": "g6-nanode-1",
"label": "DBaaS - Nanode 1GB",
"memory": 1024,
"vcpus": 1
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed Database Type View
This command is currently only available for customers who already have an active Managed Database.
Display the details of a single Managed Database type. The type and number of nodes determine the resources and price of a Managed Database instance.
Authorizations
Path Parameters
typeId | string RequiredThe ID of the Managed Database type. |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl https://api.linode.com/v4/databases/types/g6-nanode-1
linode-cli databases type-view g6-nanode-1
Response Samples
{
"class": "nanode",
"deprecated": false,
"disk": 25600,
"engines": {
"mysql": [
{
"price": {
"hourly": 0.03,
"monthly": 20
},
"quantity": 1
}
],
"postgresql": [
{
"price": {
"hourly": 0.03,
"monthly": 20
},
"quantity": 1
}
]
},
"id": "g6-nanode-1",
"label": "DBaaS - Nanode 1GB",
"memory": 1024,
"vcpus": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
class | string The compute class category. | ||||||||||||||||||||
deprecated | boolean Whether this Database plan type has been deprecated and is no longer available. | ||||||||||||||||||||
disk | integer The amount of disk space set aside for Databases of this plan type. The value is represented in megabytes. | ||||||||||||||||||||
engines | object
| ||||||||||||||||||||
id | string The ID representing the Managed Database node plan type. | ||||||||||||||||||||
label | string A human-readable string that describes each plan type. For display purposes only. | ||||||||||||||||||||
memory | integer The amount of RAM allocated to Database created of this plan type. The value is represented in megabytes. | ||||||||||||||||||||
vcpus | integer The integer of number CPUs allocated to databases of this plan type. |
errors | array
of objects
|