# Transfer types and lifecycles

A transfer lifecycle includes various statuses following one another in the order determined by the transfer type.

## Transfer types {#transfer-types}

The following types of transfers are available:

* _**Snapshot**_: Transfers a snapshot of the source to the target. Apart from a one-time snapshot transfer, there are copy types, such as _Regular_ and _Regular incremental_.
* _**Replication**_: Continuously receives changes from the source and applies them to the target. Initial data synchronization is not performed.
* _**Snapshot and increment**_: Transfers the current state of the source to the target and keeps it up-to-date.

The transfer type you select depends on data changes on the source endpoint, requirements for the frequency of data delivery, and the relevance of data.

![transfer-select](../../_assets/data-transfer/lifecycle/transfer-select.svg)

### Copy {#copy}

The _**Snapshot**_ transfer is designed for transferring the state of the source database to the target without keeping it up-to-date. Changes occurring on the source after the transfer is completed will not be transferred. This type of transfer can prove useful when there is no writing load on the source or no need to keep the target database up-to-date, e.g., [when deploying test environments](use-cases.md#testing).

When the transfer is ready, its status automatically switches to **Copying**. It is maintained until all data in the source is transferred to the target. Then the transfer is automatically deactivated and switches its status to **Completed**.

The transition between statuses for the _**Snapshot**_ transfer type is shown below:

![lifecycle-copy](../../_assets/data-transfer/lifecycle/copy.svg)

Yandex Data Transfer supports three types of data copy:

* _Single_: Copies all data from the source to the target when activating a transfer. Data is copied in descending order of table size (the largest tables are copied first). This type of copy may take a long time if the amount of data to transfer is large. In addition, one-time copying does not factor in data changes. You can recopy the data only after the previous operation is completed.
* _Regular_: Copies all data from the source to the target at certain time intervals. This copy method allows you to set up regular data delivery. It is recommended for small frequently modified tables.
* _Regular incremental_: Copies to the target at certain time intervals only the data that has been modified in the source since the previous copy. This approach allows you to arrange data delivery to the target with the minimum possible latency and load on the data source. However, it does not allow you to factor in data delete operations in the source. For more information, see [Regular incremental copy](regular-incremental-copy.md).

### Replication {#replication}

The _**Replication**_ transfer is designed for transferring changes from the source to the target without completely copying all data; when the transfer is [activated](../operations/transfer.md#activate), only the data schema will be transferred.

When the transfer is ready, its status automatically switches to **Replicating**, which is maintained indefinitely. Changes occurring in the source are automatically transmitted to the target.

The transition between statuses for the _**Replication**_ transfer type is shown below:

![lifecycle-replication](../../_assets/data-transfer/lifecycle/replication.svg)

### Copy and replication {#copy-and-replication}

The _**Snapshot and increment**_ transfer combines the features of the _**Snapshot**_ and _**Replication**_ transfers, i.e., the source data is completely transferred to the target and is kept up-to-date. Typically, such transfers are used in migration scenarios.

Once a transfer is set and [activated](../operations/transfer.md#activate), it will automatically update its status to **Copying**. It is maintained until all data in the source is transferred to the target.

Then the status of the transfer switches to **Replicating**: all changes occurring on the source are automatically transferred to the target.

The transition between statuses for the _**Snapshot and increment**_ transfer type is shown below:

![lifecycle-copy-and-replication](../../_assets/data-transfer/lifecycle/copy-and-replication.svg)

## Statuses {#statuses}

The current transfer status determines available actions with transfers. For more information, see [Managing transfer process](../operations/transfer.md).

* **Created** (`CREATED`): Assigned to a transfer immediately after its [creation](../operations/transfer.md#create).

* **Creating** (`CREATING`): Assigned to a transfer after its [activation](../operations/transfer.md#activate).

  At this time, the service checks the connection to the source and target and creates the resources necessary for the transfer. Depending on the [transfer type](index.md#transfer-type) and [endpoint](index.md#endpoint) settings, additional actions may be available, e.g., creating replication slots, copying a data schema, and so on.

* **Stopping** (`STOPPING`): Assigned to a transfer during its [deactivation](../operations/transfer.md#deactivate).

  At this time, the service performs the actions necessary to properly disconnect from the source and target. Depending on the [transfer type](index.md#transfer-type) and [endpoint](index.md#endpoint) settings, additional actions may be performed, e.g., closing replication slots, transferring triggers, stored procedures, and functions, creating indexes in the target database, etc.

* **Stopped** (`STOPPED`) : Assigned to a transfer after its [deactivation](../operations/transfer.md#deactivate) is complete.

  Only successful transfer deactivation guarantees the operability of the target and the source.

* **Copying** (`SNAPSHOTTING`): Assigned to _**Snapshot**_ and _**Snapshot and increment**_ transfers while copying data from the source.


* **Preparing** (`PREPARING`): Assigned to _**Replication**_ and _**Snapshot and increment**_ transfers when initiating replication. At this point, the data transfer has not started yet.


* **Replicating** (`RUNNING`): Assigned to _**Replication**_ and _**Snapshot and increment**_ transfers.
  
  * _**Replication**_: After a successful [activation](../operations/transfer.md#activate).
  * _**Snapshot and increment**_: After successfully copying data from the source.

* **Completed** (`DONE`): Assigned to transfers that have successfully moved the data.

* **Error** (`ERROR`): Assigned to a transfer if it fails due to operational issues.

  A transfer's status may switch to ****Error**** during activation, data replication, or copying. Depending on the status that preceded the error, the transfer can be [reactivated](../operations/transfer.md#activate). Errors may occur both on the source and the target.

  Learn more about possible error causes and how to resolve them in [Troubleshooting in Data Transfer](../troubleshooting/index.md).


You will be [billed](../pricing.md) for transfers under the paid usage model when these enter the **Replicating** (`RUNNING`), **Copying** (`SNAPSHOTTING`), or **Stopping** (`STOPPING`) status.