Skip to main content

online_migrations

Creates, updates, deletes, gets or lists a online_migrations resource.

Overview

Nameonline_migrations
TypeResource
Iddigitalocean.databases.online_migrations

Fields

NameDatatypeDescription
idstringThe ID of the most recent migration.
created_atstringThe time the migration was initiated, in ISO 8601 format.
statusstringThe current status of the migration.

Methods

NameAccessible byRequired ParamsDescription
databases_get_migration_statusSELECTdatabase_cluster_uuidTo retrieve the status of the most recent online migration, send a GET request to /v2/databases/$DATABASE_ID/online-migration.
databases_delete_online_migrationDELETEdatabase_cluster_uuid, migration_idTo stop an online migration, send a DELETE request to /v2/databases/$DATABASE_ID/online-migration/$MIGRATION_ID. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.
databases_update_online_migrationEXECdatabase_cluster_uuidTo start an online migration, send a PUT request to /v2/databases/$DATABASE_ID/online-migration endpoint. Migrating a cluster establishes a connection with an existing cluster and replicates its contents to the target cluster. Online migration is only available for MySQL, PostgreSQL, and Redis clusters.

SELECT examples

To retrieve the status of the most recent online migration, send a GET request to /v2/databases/$DATABASE_ID/online-migration.

SELECT
id,
created_at,
status
FROM digitalocean.databases.online_migrations
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}';

DELETE example

Deletes the specified online_migrations resource.

/*+ delete */
DELETE FROM digitalocean.databases.online_migrations
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}'
AND migration_id = '{{ migration_id }}';