> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data transfer types and stop conditions

Data transfers are based on consecutive [iterations](/object-storage/transfer/overview#iterations). Each iteration passes the source and destination buckets once. You can configure the number of iterations and the interval between them. To do so:

* Specify the data transfer type if you [launch the data transfer](/object-storage/transfer/launch) in the web console.
* Set the stop condition if you launch the data transfer by using the CLI or other developer tools.

## Data transfer type (web console)

When you create a data transfer in the web console, you can select the *data transfer type*:

* **One-time transfer**: Data transfer is completed after just one iteration. One-time transfers are designed for data migration and backup.
* **Replication**: Iterations continue until you stop or delete the data transfer. Replications are designed for continuous synchronization between a source and a destination.

## Stop condition (developer tools)

When you use the CLI or other developer tools to create a data transfer, set a *stop condition* in the data transfer configuration. This condition specifies when the data transfer should stop.

The configuration must include exactly one of the following options:

* `.spec.after_one_iteration` (same as the **One-time transfer** type): Transfer stops after completing its first iteration. The value should be an empty object.

  <Tabs>
    <Tab title="CLI">
      ```json theme={null}
      {
        "spec": {
          "after_one_iteration": {},
          // Other parameters
        }
      }
      ```
    </Tab>

    <Tab title="Terraform">
      ```hcl theme={null}
      resource "nebius_storage_v1_transfer" "one_time_transfer" {
        stop_condition {
          after_one_iteration = true
        }
        # Other parameters
      }
      ```
    </Tab>
  </Tabs>

* `.spec.after_n_empty_iterations`: Transfer stops after a number of consecutive [empty iterations](/object-storage/transfer/overview#empty-iterations). For example, after five iterations:

  <Tabs>
    <Tab title="CLI">
      ```json theme={null}
      {
        "spec": {
          "after_n_empty_iterations": {
            "empty_iterations_threshold": 5
          },
          // Other parameters
        }
      }
      ```
    </Tab>

    <Tab title="Terraform">
      ```hcl theme={null}
      resource "nebius_storage_v1_transfer" "empty_iterations_transfer" {
        stop_condition {
          after_n_empty_iterations {
            empty_iterations_threshold = 5
          }
        }
        # Other parameters
      }
      ```
    </Tab>
  </Tabs>

* `.spec.infinite` (same as the **Replication** type): Transfer continues indefinitely until manually stopped.

  <Tabs>
    <Tab title="CLI">
      ```json theme={null}
      {
        "spec": {
          "infinite": {},
          // Other parameters
        }
      }
      ```
    </Tab>

    <Tab title="Terraform">
      ```hcl theme={null}
      resource "nebius_storage_v1_transfer" "infinite_transfer" {
        stop_condition {
          infinite = true
        }
        # Other parameters
      }
      ```
    </Tab>
  </Tabs>

## Interval between iterations

For data transfers with more than one iteration, you can optionally configure an interval between iterations:

<Tabs>
  <Tab title="Web console">
    In the [web console](https://console.nebius.com/datatransfer), this setting appears under **Interval between iterations** when you [create](/object-storage/transfer/launch) or [modify](/object-storage/transfer/manage) a data transfer.
  </Tab>

  <Tab title="CLI">
    ```json theme={null}
    {
      "spec": {
        "inter_iteration_interval": "<HhMmSs>"
        // Other parameters
      }
    }
    ```
  </Tab>

  <Tab title="Terraform">
    ```hcl theme={null}
    resource "nebius_storage_v1_transfer" "example_transfer" {
      inter_iteration_interval = "<HhMmSs>"
      # Other parameters
    }
    ```
  </Tab>
</Tabs>

In the value, specify the number of hours, minutes and seconds for the interval. For example, `1h20m40s`.
