How to preserve S3 or DigitalOcean Spaces metadata on the files/objects
For cloud storage replication/sync, how to preserve objects' metadata?
If you are trying to sync your data from one bucket to the other, you may choose to preserve the metadata on each file/object.
Enable "Copy metadata"
As shown in the screenshot below, view your cloud sync job, then:
- Click on Advanced
- Under Additional Settings, enable the Copy metadata option
DigitalOcean Spaces Metadata (default behavior)
In case of DigitalOcean Spaces, the metadata of an object is only preserved by default when a "server-side copy" is made. DigitalOcean supports "server-side copy" only when copying objects between buckets within the same region. It does not support that between different regions.
So if you are syncing one DigitalOcean Spaces bucket to another DigitalOcean Spaces bucket in the same region, you can expect to have your metadata preserved. Otherwise, the metadata is not preserved.
Last updated on August 4, 2021