- Overwrite objects that have a newer pair in the source.
- Delete objects that no longer have a pair in the source.
- Apply the overwrite/delete setting to unmanaged 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-Modifiedheader). 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.
- Web console
- CLI
- Terraform
- In the web console, go to Storage → Data Transfer.
- Click Create data transfer.
- Select the overwriting setting under Destination → Overwriting destination objects.
Deleting destination objects
The delete strategy determines what happens to a destination object when its source pair no longer exists (the object was deleted from the source).- Delete if not in source: At each iteration the transfer deletes the destination object when it has no corresponding object in the source. Use this to keep the destination in synchronization with the source (for example, for a replication).
- Do not delete: The transfer never deletes destination objects. Objects that exist only in the destination are left as-is. Use it for a backup or when you add extra objects that shouldn’t be removed.
- Web console
- CLI
- Terraform
- In the web console, go to Storage → Data Transfer.
- Click Create data transfer.
- Select the deleting setting under Destination → Deleting destination objects.
Unmanaged destination objects
Unmanaged objects are objects in the destination bucket that weren’t copied from the source bucket during the current or past transfers. You can configure whether Object Storage can overwrite them with source objects or delete them when they don’t have pairs in the source:- Allow overwriting/deleting: Object Storage overwrites or deletes unmanaged destination objects. Use only when you’re sure that you will not upload important data directly to the destination.
- Do not overwrite/delete (default): Object Storage doesn’t overwrite or delete unmanaged destination objects. Only destination objects that were copied from the source bucket during the current or past transfers are affected.
Example
Example
Consider the following states of the source bucket and the destination bucket before the start of a transfer:
Source
object_1
object_2
object_3
Destination
object_4
object_4 in the destination is an unmanaged object. If the transfer is configured to delete destination objects that don’t have pairs in the source, and allows overwriting/deleting unmanaged destination objects, object_4 is deleted at the next iteration:Source
object_1
object_2
object_3
Destination
object_1
object_2
object_3
- Web console
- CLI
- Terraform
- In the web console, go to Storage → Data Transfer.
- Click Create data transfer.
- Select the unmanaged objects setting under Destination → Unmanaged objects.