[Yandex Cloud documentation](../../index.md) > [Tutorials](../index.md) > [Building a data platform](index.md) > Migrating data from a third-party Greenplum® or PostgreSQL cluster to Yandex MPP Analytics for PostgreSQL using Data Transfer

# Migrating data from a third-party Greenplum® or PostgreSQL cluster to Yandex MPP Analytics for PostgreSQL using Yandex Data Transfer

You can migrate your database from a third-party Greenplum® or PostgreSQL cluster to Yandex MPP Analytics for PostgreSQL using Yandex Data Transfer. This method enables you to:

* Migrate your database with zero downtime.
* Migrate from older to newer versions of Greenplum®.
* Eliminate the need for an intermediate VM or for exposing your Managed Service for PostgreSQL target cluster to the internet.

For more information, see [Problems addressed by Yandex Data Transfer](../../data-transfer/concepts/use-cases.md).

{% note info %}

Data Transfer enables you to transfer the state of the source database to the Yandex MPP Analytics for PostgreSQL target without keeping it up-to-date (the [_**Snapshot**_](../../data-transfer/concepts/transfer-lifecycle.md#copy) transfer type). Changes occurring on the source after the transfer is completed will not be transferred.

{% endnote %}

To migrate your database, you need to directly transfer the data, acquire a write lock for the old database, and switch over the load to the database cluster in Yandex Cloud.


## Required paid resources {#paid-resources}

* Yandex MPP Analytics for PostgreSQL cluster: use of computing resources allocated to hosts, storage and backup size (see [Yandex MPP Analytics for PostgreSQL pricing](../../managed-greenplum/pricing/index.md)).
* Public IP addresses if public access is enabled for cluster hosts (see [Yandex Virtual Private Cloud pricing](../../vpc/pricing.md)).


## Getting started {#before-you-begin}

[Create a Greenplum® target cluster](../../managed-greenplum/operations/cluster-create.md) with computing capacity and storage size matching the source database’s environment.

The source and target database names must be the same.

## Transferring data {#data-transfer}

1. Prepare the source cluster:
    * [Greenplum®](../../data-transfer/operations/prepare.md#source-gp)
    * [PostgreSQL](../../data-transfer/operations/prepare.md#source-pg)
1. [Prepare the target cluster](../../data-transfer/operations/prepare.md#target-gp).
1. [Create a source endpoint](../../data-transfer/operations/endpoint/index.md#create) with the following settings:

    * **Database type**: `Greenplum` or `PostgreSQL`.
    * **Endpoint parameters** → **Connection settings**: `Custom installation`.

        Configure the source cluster connection settings.

1. [Create a target endpoint](../../data-transfer/operations/endpoint/index.md#create) with the following settings:

    * **Database type**: `Greenplum`.
    * **Endpoint parameters** → **Connection settings**: `Cluster`.

        Specify the target cluster ID.

1. [Create a transfer](../../data-transfer/operations/transfer.md#create) of the _**Snapshot**_-type that will use the new endpoints.
1. [Activate the transfer](../../data-transfer/operations/transfer.md#activate).
1. Wait for the transfer status to change to **Completed**.

    For more information about transfer statuses, see [Transfer lifecycle](../../data-transfer/concepts/transfer-lifecycle.md#statuses).

1. Switch the source cluster to <q>read-only</q> mode and transfer the workload over to the target cluster.
1. To minimize resource consumption, delete the resources you no longer need:
    1. [Delete the completed transfer](../../data-transfer/operations/transfer.md#delete).
    1. [Delete the source and target endpoints](../../data-transfer/operations/endpoint/index.md#delete).