dots.v2.databases.byDatabase_cluster_uuid().onlineMigration.put()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.databases.byDatabase_cluster_uuid(database_cluster_uuid).onlineMigration.put(body: Source_database, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Online_migration>

Description

To start an online migration, send a PUT request to /v2/databases/{database_cluster_uuid}/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, Caching, and Valkey clusters. If the existing database is continuously being written to, the migration process will continue for up to two weeks unless it is manually stopped. Online migration is only available for MySQL, PostgreSQL, Caching, and Valkey clusters.

Parameters

Path Parameters

database_cluster_uuid string required

Example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30

A unique identifier for a database cluster.

Request Body

source object required
Show child properties
host string optional

Example: db.example.com

The FQDN pointing to the database cluster's current primary node.

port integer optional

Example: 25060

The port on which the database cluster is listening.

dbname string optional

Example: defaultdb

The name of the default database.

username string optional

Example: doadmin

The default user for the database.

password string optional

Example: example_password

The randomly generated password for the default user.

disableSsl boolean optional

Example: false

Enables SSL encryption when connecting to the source database.

ignoreDbs array of strings optional

Example: ["db0", "db1"]

List of databases that should be ignored during migration.

Default: []

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.databases
    .byDatabase_cluster_uuid("9cc10173-e9ea-4176-9dbc-a4cee4c4ff30").onlineMigration.put({
    source: {
        host: "source-db.example.com",
        dbname: "defaultdb",
        port: 25060,
        username: "doadmin",
        password: "example_password",
    },
    disableSsl: false,
    ignoreDbs: [
        "db0",
        "db1",
    ],
});

Response Example

Show Response Example
{
  "id": "77b28fc8-19ff-11eb-8c9c-c68e24557488",
  "status": "running",
  "created_at": "2020-10-29T15:57:38Z"
}

More Information

See /v2/databases/{database_cluster_uuid}/online-migration in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.