Migrating data from a self-managed Postgres database to a different self-managed Postgres database Innovation Release

With both Data Migration Service (DMS) agents running and your schema either imported or ready for Hybrid Manager (HM) to import, you're ready to create a migration in the HM console.

The steps below vary depending on the approach you chose on the previous page. Select the tab that matches your choice.

Creating a migration

A migration establishes a sync between your Postgres source and a self-managed destination database via HM.

  1. In the HM console, select the project from which you want to manage the migration.

  2. In the project, select Migrate > Migrations.

  3. In the Migrations page, select Create New Migration.

  4. In the Create OLTP Migration page, assign a name to the migration.

  5. Select the source of the migration. The ID for the reader DMS agent is listed in the Source menu.

  6. Under Scope, select the option that matches your approach:

  7. Select the snapshot type: Snapshot or Snapshot + Streaming.

  8. Under Destination Type, select a self-managed instance as the destination for the migration. The ID for the writer DMS agent is listed in the Destination menu. Then, select Next.

  9. On the Review your Tables tab, select the tables and columns to include in the migration. Expand a table to view its columns and optionally map source columns to different destination column names. Column mapping is only available for the Data only scope.

  10. Select Create Migration.

The HM console displays the new migration. If you chose Snapshot + Streaming, the DMS agents stream data changes continuously while the migration shows a Running state.

Note

The DMS agent streams data changes only — not DDL changes (schema modifications).

Monitoring progress

Migration list view

The Migrations page shows a summary of all migrations in the project. The Migration progress column displays three metrics per migration:

  • Total number of tables — total tables included in this migration
  • Snapshot tables completed — tables that have finished the snapshot stage
  • Migrated rows — cumulative rows migrated across all tables

Migration details view

Select a migration from the list to open the details page, which has four tabs:

  • Overview — Shows the current migration state and general information about the source and destination databases. For Snapshot + Streaming migrations, the migration is caught up when the status is Streaming. For Snapshot migrations, it's finished when the status is Completed.

  • Tables — Shows all tables selected for migration. For each table, you can see source and destination table and schema names, snapshot status, mapped columns, migrated rows, and migration rate. Select the + icon to expand a table and view column-level mappings.

  • Error history — Lists all errors logged for this migration. Select the i icon to open the full error log for a specific error. For stuck or failed migrations, active errors here indicate where to start troubleshooting.

  • Metrics — Links to a Grafana dashboard with performance metrics for this migration. See Metrics tab for details.

Migration metrics

Note

The Metrics tab is available in HM v1.4. It isn't included in the 2026.5 Innovation Release.

During any running migration (Snapshot or Snapshot + Streaming), the DMS agents continuously report performance metrics to HM. If you deployed the reader or writer agent yourself — any setup with a self-managed source or destination — set METRICS_TASK_ENABLED=true in the agent's run-cdcagent.sh. See Configuring and running the EDB DMS agent for agent configuration steps.

For details about the Grafana dashboard shown in the Metrics tab, see Metrics tab.

DMS agent logs

The HM console doesn't surface all DMS agent errors. If a migration is stuck or no tables are progressing, check the terminal where you ran run-cdcagent.sh for ERROR log entries — these often contain the root cause. Common issues include version incompatibility between the DMS agent and HM, and connectivity or credential failures.

Finalizing a streaming migration

Note

This section applies only to Snapshot + Streaming migrations. For Snapshot migrations, DMS marks the migration as completed automatically.

Monitoring catch-up before cutover

Before stopping writes on the source, give the destination time to catch up. Use the Migration details page to track row counts and replication lag. Begin the cutover only after the destination is consistently close to the source.

Performing the cutover

When you're ready to switch traffic from the source to the destination:

  1. Stop all writes on the source database.

  2. Verify in the HM console that the destination has applied the last source change.

  3. On the Migration details page, select Mark as Completed.

This stops the streaming process.

Schema finalization stage

Applying deferred constraints and verifying data

After cutting over, confirm that deferred constraints are in place on the destination database and that migrated data matches the source.

Reapplying deferred constraints

Deduplicating rows when needed

For tables that had no primary key or unique constraints, the EDB DMS agent provides at-least-once delivery, which can result in duplicate rows. Perform deduplication as part of your verification step.

Verifying migrated data

Compare the source and destination databases to confirm all data was migrated successfully. You can use LiveCompare for this.

  • LiveCompare — row-level data comparison tool for verifying migration completeness
  • Migration terminology — definitions for snapshot, streaming, and other migration concepts