diff --git a/products/managed-postgres/migrations/overview.mdx b/products/managed-postgres/migrations/overview.mdx new file mode 100644 index 00000000..32ba9cdb --- /dev/null +++ b/products/managed-postgres/migrations/overview.mdx @@ -0,0 +1,68 @@ +--- +slug: /cloud/managed-postgres/migrations/overview +sidebarTitle: 'Overview' +title: 'Managed Postgres data migration' +description: 'Compare the four migration paths into ClickHouse Managed Postgres and pick the one that fits your source database and downtime requirements.' +keywords: ['managed postgres', 'migration', 'postgres migration', 'clickpipes', 'peerdb', 'pg_dump', 'pg_restore', 'logical replication'] +doc_type: 'guide' +--- + +import BetaBadge from "/snippets/components/BetaBadge/BetaBadge.jsx"; + +# Managed Postgres data migration + + + +You can migrate to Managed Postgres through four different paths. Which one +fits depends on whether you need ongoing replication, what source you're +migrating from, and how much downtime your application can tolerate during +cutover. + +| Method | Ongoing replication (CDC) | Where it runs | Best for | +| ------------------------------------------------------------------------------------- | ------------------------- | -------------------------- | ------------------------------------------------------------------------- | +| [ClickPipes](/products/managed-postgres/migrations/clickhouse-cloud) | Yes | ClickHouse Cloud console | Most migrations — guided wizard with initial load and CDC out of the box | +| [PeerDB](/products/managed-postgres/migrations/peerdb) | Yes | Self-hosted (Docker) | Sources or workflows not covered by the ClickPipes UI | +| [pg_dump and pg_restore](/products/managed-postgres/migrations/pg_dump-pg_restore) | No | Your local machine | One-time moves of small or static datasets where downtime is acceptable | +| [Logical replication](/products/managed-postgres/migrations/logical-replication) | Yes | Source and target Postgres | Direct control over native Postgres replication, no third-party tooling | + +## ClickPipes {#clickpipes} + +[ClickPipes](/products/managed-postgres/migrations/clickhouse-cloud) is the recommended +path for most migrations. It runs entirely inside the ClickHouse Cloud console +and walks you through connecting to the source, exporting and importing the +schema, and starting an initial load with or without CDC. Pre-built source +connectors cover Amazon RDS, Aurora, Supabase, Google Cloud SQL, Azure +Flexible Server, Neon, Crunchy Bridge, TimescaleDB, and any generic Postgres +instance. + +## PeerDB {#peerdb} + +[PeerDB](/products/managed-postgres/migrations/peerdb) is a self-hosted migration +tool you run via Docker. Use it when your source or workflow isn't a fit for +the ClickPipes wizard — for example, when you need to script peer creation +across many databases or run the migration entirely inside your own network. +PeerDB doesn't migrate indexes, constraints, or triggers automatically; you +recreate those on the target after the data lands. + +## pg_dump and pg_restore {#pg-dump-pg-restore} + +[pg_dump and pg_restore](/products/managed-postgres/migrations/pg_dump-pg_restore) +take a snapshot of the source and replay it on the target. There's no ongoing +replication, so writes must stop on the source for the duration of the dump +and restore. This is the right choice for small or static datasets, or +non-production environments where a maintenance window is acceptable. + +## Logical replication {#logical-replication} + +[Logical replication](/products/managed-postgres/migrations/logical-replication) +uses native Postgres publications and subscriptions to stream changes from +the source to the target. You configure `wal_level`, replication slots, and +the `REPLICATION` privilege yourself — no third-party tooling sits in the +middle. Pick this path when you want full control over the replication +mechanics or your environment rules out external migration tools. + +## After the migration {#after-migration} + +Once data is moving, use [data validation](/products/managed-postgres/migrations/data-validation) +to confirm row counts and content match between source and target before +cutting over application traffic. diff --git a/products/managed-postgres/navigation.json b/products/managed-postgres/navigation.json index f38202c7..ed84c8cd 100644 --- a/products/managed-postgres/navigation.json +++ b/products/managed-postgres/navigation.json @@ -6,59 +6,68 @@ "group": "Get started", "pages": [ "products/managed-postgres/overview", - "products/managed-postgres/quickstart" + "products/managed-postgres/quickstart", + "products/managed-postgres/connection", + { + "group": "Data migration", + "pages": [ + "products/managed-postgres/migrations/overview", + "products/managed-postgres/migrations/clickhouse-cloud", + "products/managed-postgres/migrations/peerdb", + "products/managed-postgres/migrations/pg_dump-pg_restore", + "products/managed-postgres/migrations/logical-replication", + "products/managed-postgres/migrations/data-validation" + ] + } ] }, { - "group": "Features", + "group": "Use it", "pages": [ - "products/managed-postgres/connection", - "products/managed-postgres/settings", - "products/managed-postgres/scaling", - "products/managed-postgres/security", + "products/managed-postgres/clickhouse-integration", "products/managed-postgres/high-availability", "products/managed-postgres/read-replicas", + "products/managed-postgres/scaling", "products/managed-postgres/backup-and-restore", - "products/managed-postgres/extensions", - "products/managed-postgres/upgrades", - "products/managed-postgres/openapi" - ] - }, - { - "group": "Benchmarks", - "pages": [ - "products/managed-postgres/benchmarks" + "products/managed-postgres/security" ] }, { - "group": "ClickHouse Integration", + "group": "Configure", "pages": [ - "products/managed-postgres/clickhouse-integration" - ] - }, - { - "group": "Migrations", - "pages": [ - "products/managed-postgres/migrations/pg_dump-pg_restore", - "products/managed-postgres/migrations/logical-replication", - "products/managed-postgres/migrations/peerdb", - "products/managed-postgres/migrations/data-validation", - "products/managed-postgres/migrations/clickhouse-cloud" - ] - }, - { - "group": "Monitoring", - "pages": [ - "products/managed-postgres/monitoring/overview", - "products/managed-postgres/monitoring/dashboard", - "products/managed-postgres/monitoring/metrics", - "products/managed-postgres/monitoring/prometheus", - "products/managed-postgres/monitoring/query-insights" + "products/managed-postgres/settings", + { + "group": "Extensions", + "pages": [ + "products/managed-postgres/extensions", + { + "group": "pg_clickhouse", + "pages": [ + "integrations/connectors/tools/pg_clickhouse/introduction", + "integrations/connectors/tools/pg_clickhouse/tutorial", + "integrations/connectors/tools/pg_clickhouse/reference" + ] + } + ] + }, + "products/managed-postgres/upgrades" ] }, { - "group": "FAQ", + "group": "Operate & reference", "pages": [ + { + "group": "Monitoring", + "pages": [ + "products/managed-postgres/monitoring/overview", + "products/managed-postgres/monitoring/dashboard", + "products/managed-postgres/monitoring/query-insights", + "products/managed-postgres/monitoring/prometheus", + "products/managed-postgres/monitoring/metrics" + ] + }, + "products/managed-postgres/benchmarks", + "products/managed-postgres/openapi", "products/managed-postgres/faq" ] }