---
title: Move data in and out of Lakebase
description: "Compare the ways to move data in and out of Lakebase: logical replication, migrations, Change Data Feed, synced tables, read replicas, and pg\\_dump."
canonical_url: https://docs.databricks.com/aws/en/oltp/projects/move-data-in-and-out
---

# Move data in and out of Lakebase

Lakebase offers several ways to move data, each suited to a different destination and goal. Use this page to choose the right one.

## <a id="compare" />Compare the methods

| Method                                                                                          | Direction       | Destination                         | Use it when                                                                                                                                                             |
| ----------------------------------------------------------------------------------------------- | --------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Logical replication](https://docs.databricks.com/aws/en/oltp/projects/logical-replication.md)  | In and out      | A Postgres database                 | You migrate an existing Postgres database into Lakebase, replicate between Lakebase databases in different regions, or stream changes to an external Postgres database. |
| [Change Data Feed](https://docs.databricks.com/aws/en/oltp/projects/lakebase-cdf.md)            | Out             | A Unity Catalog managed Delta table | You want Lakebase changes in the lakehouse for analytics, ETL, or audit.                                                                                                |
| [Synced tables](https://docs.databricks.com/aws/en/oltp/projects/sync-tables.md)                | In              | A Lakebase Postgres table           | You want to serve lakehouse data from Postgres for low-latency reads.                                                                                                   |
| [Read replicas](https://docs.databricks.com/aws/en/oltp/projects/read-replicas.md)              | Within Lakebase | A read-only compute                 | You want to scale read traffic without copying data.                                                                                                                    |
| [Migrations](https://docs.databricks.com/aws/en/oltp/projects/migrations.md) (Beta)             | In              | A Lakebase database                 | You make a one-time copy of an existing Postgres database in Lakebase, and want Lakebase to check the source for compatibility before the copy.                         |
| [pg\_dump and pg\_restore](https://docs.databricks.com/aws/en/oltp/projects/pg-dump-restore.md) | In and out      | A Postgres database                 | You do a one-time copy or a backup, and downtime during the copy is acceptable.                                                                                         |

For cross-region resiliency rather than data movement, use [disaster recovery](https://docs.databricks.com/aws/en/oltp/projects/disaster-recovery.md), which replicates a project's data to a secondary workspace in another region at the storage layer.

## <a id="replication-terms" />A note on the word "replication"

Several Lakebase features use the word replication for different mechanisms. Do not confuse them:

* **Logical replication** copies row-level changes between Postgres databases.
* **Read replicas** serve reads from the same storage as the primary compute. They do not copy data.
* **Disaster recovery** copies a project's data to another region at the storage layer.

## Next steps

* **Replicate into Lakebase**: Replicate an existing Postgres database into Lakebase with logical replication. See [Replicate data into Lakebase](https://docs.databricks.com/aws/en/oltp/projects/logical-replication-subscription.md).
* **Copy into Lakebase one time**: Migrate an existing Postgres database into Lakebase in a single copy (Beta). See [Migrate a Postgres database to Lakebase](https://docs.databricks.com/aws/en/oltp/projects/migrations.md).
* **Store changes in the lakehouse**: Capture Lakebase changes as Delta. See [Lakebase Change Data Feed](https://docs.databricks.com/aws/en/oltp/projects/lakebase-cdf.md).
* **Serve lakehouse data**: Sync Unity Catalog tables into Postgres. See [Serve lakehouse data with synced tables](https://docs.databricks.com/aws/en/oltp/projects/sync-tables.md).
