> ## Documentation Index
> Fetch the complete documentation index at: https://cockroachlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delta Migration

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

A *Delta Migration* uses an initial data load, followed by <InternalLink path="migration-considerations-replication">continuous replication</InternalLink>, to <InternalLink path="migration-overview">migrate data to CockroachDB</InternalLink>. In this approach, you migrate most application data to the target using <InternalLink path="molt-fetch">MOLT Fetch</InternalLink> **before** stopping application traffic to the source database. You then use <InternalLink path="molt-replicator">MOLT Replicator</InternalLink> to keep the target database in sync with any changes in the source database (the migration *delta*), before finally halting traffic to the source and cutting over to the target after schema finalization and data verification.

* All source data is migrated to the target <InternalLink path="migration-considerations-granularity">at once</InternalLink>.

* This approach utilizes <InternalLink path="migration-considerations-replication">continuous replication</InternalLink>.

* <InternalLink path="migration-considerations-rollback">Failback replication</InternalLink> is supported, though this example will not use it. See <InternalLink path="migration-approach-phased-delta-failback">Phased Delta Migration with Failback Replication</InternalLink> for an example of a migration that uses failback replication.

This approach is best for production environments that need to minimize system downtime.

This page describes an example scenario. While the commands provided can be copy-and-pasted, they may need to be altered or reconsidered to suit the needs of your specific environment.

<img src="https://mintcdn.com/cockroachlabs/mEy4bzaxzRbvNkMw/images/molt/molt_delta_flow.svg?fit=max&auto=format&n=mEy4bzaxzRbvNkMw&q=85&s=5e8db5dd7413fc42558032aefc8e1eba" alt="Delta migration flow" style={{ maxWidth: "100%", display: "block", marginLeft: "auto", marginRight: "auto" }} width="456" height="391" data-path="images/molt/molt_delta_flow.svg" />

## Example scenario

You have a small (300 GB) database that provides the data store for a web application. You want to migrate the entirety of this database to a new CockroachDB cluster. Business cannot accommodate a full maintenance window, but it can accommodate a brief (\<60 second) halt in traffic.

The application runs on a Kubernetes cluster.

**Estimated system downtime:** 3-5 minutes.

## Step-by-step walkthroughs

The following walkthroughs demonstrate how to use the MOLT tools to perform this migration for each supported source database:

* <InternalLink path="delta-migration-postgres">Delta Migration from PostgreSQL</InternalLink>
* <InternalLink path="delta-migration-mysql">Delta Migration from MySQL</InternalLink>
* <InternalLink path="delta-migration-oracle">Delta Migration from Oracle</InternalLink>

<Note>
  For CockroachDB-to-CockroachDB migrations, contact your account team for guidance.
</Note>

## See also

* <InternalLink path="migration-overview">Migration Overview</InternalLink>
* <InternalLink path="migration-considerations">Migration Considerations</InternalLink>
* <InternalLink path="migration-approach-phased-bulk-load">Phased Bulk Load Migration</InternalLink>
* <InternalLink path="molt-fetch">MOLT Fetch</InternalLink>
* <InternalLink path="molt-verify">MOLT Verify</InternalLink>
