Scaleway logo
Commands

Documentation for `scw sdb-sql`

The CLI documentation pages are currently under construction

The content is up to date. We're making improvements to the site over the next few weeks for a better experience.

This API allows you to manage your Serverless SQL Databases.

Export a database backup

Export a database backup providing a download link once the export process is completed. You must provide the backup_id parameter.

Usage:

TerminalCode
scw sdb-sql backup export <backup-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
backup-idUUID of the Serverless SQL Database backup.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Get a database backup information

Retrieve information about your Serverless SQL Database backup. You must provide the backup_id parameter.

Usage:

TerminalCode
scw sdb-sql backup get <backup-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
backup-idUUID of the Serverless SQL Database backup.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

List your Serverless SQL Database backups

List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in descending order, though this can be modified via the order_by field.

Usage:

TerminalCode
scw sdb-sql backup list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idFilter by the UUID of the Scaleway project.
database-idFilter by the UUID of the Serverless SQL Database.Required
order-bySorting criteria. One of created_at_asc, created_at_desc.One of: created_at_desc, created_at_asc
organization-idFilter by the UUID of the Scaleway organization.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, all

Create a new Serverless SQL Database

You must provide the following parameters: organization_id, project_id, name, cpu_min, cpu_max. You can also provide from_backup_id to create a database from a backup.

Usage:

TerminalCode
scw sdb-sql database create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameThe name of the Serverless SQL Database to be created.Required
cpu-minThe minimum number of CPU units for your Serverless SQL Database.Required
cpu-maxThe maximum number of CPU units for your Serverless SQL Database.Required
from-backup-idThe ID of the backup to create the database from.
versionThe major version of the postgreSQL requested.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Delete a database

Deletes a database. You must provide the database_id parameter. All data stored in the database will be permanently deleted.

Usage:

TerminalCode
scw sdb-sql database delete <database-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
database-idUUID of the Serverless SQL Database.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Get a database information

Retrieve information about your Serverless SQL Database. You must provide the database_id parameter.

Usage:

TerminalCode
scw sdb-sql database get <database-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
database-idUUID of the Serverless SQL DB database.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

List your Serverless SQL Databases

List all Serverless SQL Databases for a given Scaleway Organization or Scaleway Project. By default, the databases returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. For the name parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.

Usage:

TerminalCode
scw sdb-sql database list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameFilter by the name of the database
order-bySorting criteria. One of created_at_asc, created_at_desc, name_asc, name_descOne of: created_at_asc, created_at_desc, name_asc, name_desc
organization-idFilter by the UUID of the Scaleway organization
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, all

Restore a database from a backup

Restore a database from a backup. You must provide the backup_id parameter.

Usage:

TerminalCode
scw sdb-sql database restore [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
database-idUUID of the Serverless SQL Database.Required
backup-idUUID of the Serverless SQL Database backup to restore.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Update database information

Update CPU limits of your Serverless SQL Database. You must provide the database_id parameter.

Usage:

TerminalCode
scw sdb-sql database update <database-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
database-idUUID of the Serverless SQL Database.Required
cpu-minThe minimum number of CPU units for your Serverless SQL Database.
cpu-maxThe maximum number of CPU units for your Serverless SQL Database.
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par

Usage:

TerminalCode
scw sdb-sql version