> ## 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.

# How data transfers handle destination objects

By the time an iteration of a data transfer starts, the destination bucket may already contain objects. You can configure what Object Storage does with them:

* [Overwrite objects](#overwriting-destination-objects) that have a newer pair in the source.

- Apply the overwrite setting to [unmanaged objects](#unmanaged-destination-objects) (objects in the destination that weren't transferred at previous iterations).

## Overwriting destination objects

The setting to overwrite destination objects, also known as the *overwrite strategy* in the developer tools, determines what happens when the source and destination both contain an object with the same key. Depending on the setting's value, Object Storage overwrites the destination object with the source version or leaves it unchanged:

* **Overwrite if source is newer**: Object Storage overwrites a destination object only if the source object has a newer timestamp (based on the `Last-Modified` header). This value is recommended for incremental synchronization.
* **Do not overwrite**: Object Storage doesn't overwrite existing destination objects. If an object with the same key already exists in the destination, this source object is skipped. This is the safest option to avoid accidental data loss.

You can configure overwriting objects when you [create](/object-storage/transfer/launch) a data transfer (but not for existing transfers):

<Tabs>
  <Tab title="Web console">
    In the [web console](https://console.nebius.com/datatransfer/create), the setting appears under **Overwriting destination objects**.
  </Tab>

  <Tab title="CLI">
    Set `.spec.overwrite_strategy` to one of the following values:

    * `IF_NEWER`: Overwrite if source is newer.
    * `NEVER`: Do not overwrite.

    For example:

    ```json theme={null}
    {
      "spec": {
        "overwrite_strategy": "IF_NEWER"
      }
    }
    ```
  </Tab>

  <Tab title="Terraform">
    Set the `overwrite_strategy` argument to one of the following values in your resource block:

    * `"IF_NEWER"`: Overwrite if source is newer.
    * `"NEVER"`: Do not overwrite.

    For example:

    ```hcl theme={null}
    resource "nebius_storage_v1_transfer" "example" {
      overwrite_strategy = "IF_NEWER"
      # Other parameters
    }
    ```
  </Tab>
</Tabs>

## Unmanaged destination objects

*Unmanaged objects* are objects in the destination bucket that never had a matching object in the source (they were created in the destination only, or their keys never matched the source prefix). You can configure whether they are [overwritten](#overwriting-destination-objects){/* or [deleted](#deleting-destination-objects) */} by source objects with the same keys:

* **Allow overwriting{/*/deleting*/}**: Object Storage overwrites{/* or deletes */} unmanaged destination objects. Use only when you are sure that the destination doesn't contain any important data.
* **Do not overwrite{/*/delete*/}** (default): Object Storage doesn't overwrite{/* or delete */} unmanaged destination objects. Only destination objects that previously had a pair in the source are affected. Protects objects that only exist in the destination.

For example, you use **Overwrite if source is newer**{/* and **Delete if not in source** */} with **Do not overwrite{/*/delete*/}** for unmanaged objects. The transfer updates{/* or removes */} only destination objects that correspond to source keys; any object in the destination that never had a source pair is left unchanged.

You can configure overwriting objects when you [create](/object-storage/transfer/launch) a data transfer (but not for existing transfers):

<Tabs>
  <Tab title="Web console">
    In the [web console](https://console.nebius.com/datatransfer/create), the setting for unmanaged objects appears under **Destination** → **Unmanaged objects**.
  </Tab>

  <Tab title="CLI">
    Set the `.spec.touch_unmanaged` parameter:

    * `true`: Allow overwriting unmanaged destination objects.
    * `false` (default): Do not overwrite unmanaged destination objects.

    Example:

    ```json theme={null}
    {
      "spec": {
        "touch_unmanaged": false
      }
    }
    ```
  </Tab>

  <Tab title="Terraform">
    Set the `touch_unmanaged` argument to one of the following values in your resource block:

    * `true`: Allow overwriting unmanaged destination objects.
    * `false` (default): Do not overwrite unmanaged destination objects.

    Example:

    ```hcl theme={null}
    resource "nebius_storage_v1_transfer" "example" {
      touch_unmanaged = false
      # Other parameters
    }
    ```
  </Tab>
</Tabs>
