- Create a Migration Assistant instance for an eligible target cluster using the Cloud API.
- Use the instance to migrate your data, as described in Use the Migration Assistant.
- Delete the instance when the migration is complete.
Prerequisites
- Your source database and target cluster meet the Migration Assistant eligibility requirements.
- Install
ccloudand log in to the organization that contains the target cluster. Refer to Get Started with the ccloud CLI. - Create a Cloud API service account and API key. The service account must have the Cluster Admin role on the target cluster or the Organization Admin role in the organization. The key inherits the roles of the service account.
- Your PostgreSQL source database must be reachable over the network from CockroachDB Cloud.
- Know the public IP address or network CIDR that will access the Assistant’s web interface.
Prepare the target cluster with ccloud
Useccloud to prepare the target cluster. For complete command syntax and options, refer to the ccloud CLI Command Reference.
-
Log in to the organization that contains the target cluster:
-
List the clusters in the organization:
The output includes each cluster’s name, ID, plan, and state. Select an existing eligible target and record both its name and ID.
ccloudcommands identify the cluster by name; the Migration Assistant API identifies it by ID. If you need to create an Advanced target cluster, useccloud cluster create. Replace the placeholders with a supported cloud, region, node count, and cluster size:For additional creation options, refer to Create a new cluster with ccloud. -
Add the network that will access the Assistant to the target cluster’s IP allowlist. For a single public IP address, use a
/32CIDR: -
Verify the allowlist entry:
For details, refer to Create and manage IP allowlists with ccloud.
ccloud does not currently expose the Migration Assistant endpoint. Use the target cluster ID from ccloud cluster list with the Cloud API in the following steps.
Create a Migration Assistant instance
To manage the instance, use the cluster’smigration-assistant endpoint in the Cloud API. In the following examples, replace {cluster_id} with the cluster ID returned by ccloud cluster list, and replace {secret_key} with the API key of your service account.
-
Create the instance:
The optional
regionfield specifies the Assistant’s deployment region. If omitted, the service selects a default region. The call returns immediately with statusPENDINGwhile the control plane provisions the instance in the background: -
Poll the same endpoint every 60 seconds until the status is
RUNNING. Provisioning typically takes 10 to 20 minutes, because it creates a dedicated node pool and boots the Assistant.When provisioning completes, the response includes the URL for the Assistant’s web interface. The Assistant uses Cockroach Cloud single sign-on (SSO), so theusernameandpasswordfields are empty:Theurlcontains a generated hostname in themolt-aisubdomain, such ashttps://molt-ai.bpnk.crdb.io/.bucket_granteeidentifies the cloud identity to grant access to your bucket when using optional cloud-storage loading. At launch, this option supports Google Cloud Storage only, and both the target cluster and bucket must be on Google Cloud. -
Record the
urlfrom theRUNNINGresponse.
Each instance is dedicated to your migration. It runs on isolated capacity alongside your cluster, with its own TLS certificate, and is separate from the infrastructure running the cluster itself.
Access the Assistant
- Open the
urlfrom theRUNNINGresponse in a browser. - Sign in with your Cockroach Cloud account. You must be a member of the target cluster’s organization.
ccloud cluster networking allowlist list {cluster-name} to verify that the allowlist contains your network’s current public IP address. If necessary, add the network as described in Prepare the target cluster with ccloud. You can also add or update the network in the Console under Networking.
After you add or update an allowlist entry, the change can take a few minutes to propagate to the Assistant.
Connect your source and target
In the Assistant, connect your source database and run the connectivity check before starting the migration stages. Refer to Use the Migration Assistant. Because the Assistant runs in CockroachDB Cloud, your source database must be reachable from CockroachDB Cloud, not only from your workstation:- The source needs a routable endpoint: a public hostname or IP address, or a private connection path. A database bound to localhost, or reachable only over your VPN, does not work.
- Your network and firewall rules must allow inbound connections from the Assistant on the database port.
- The connection credentials must be able to read the source’s schema catalog and
SELECTthe data to migrate.
Delete the instance
When your migration is complete:- Download any converted DDL, scripts, or reports you want to keep.
-
Delete the Assistant instance:
The response shows
DELETINGwhile teardown is in progress:

