Skip to content

Feature request: Copy custom metadata on objects #111

Closed

Description

@mlanner

For object storage systems that support custom (user defined) metadata types, include a flag (-meta?) that will also copy custom metadata from source to destination. For example, if copying/migrating data from Amazon S3 to Swift, or from Swift to Swift, it would be very handy to be able to maintain any custom metadata set on the objects.

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Activity

  1. ncw commented on Aug 26, 2015

    @ncw
    Member

    @mlanner nice idea - I've wanted exactly this before when moving stuff about in Swift. Not sure how I'd implement it - I'll have a think.

  2. mlanner commented on Aug 27, 2015

    @mlanner
    Author

    @ncw How about something like: If you invoked the -meta flag in your Rclone command, then it will head the object, read the custom metadata and then store it in a temporary json blob. Once the object has been transferred and the md5sum has been checked, the metadata stored in json will be applied through a post to the object in the destination container/bucket. ?? It might require a few extra operations, but it would only take a hit if you invoke the -meta flag, and the operations would (perhaps) not be ridiculously expensive.

    Only an idea. I'm sure there might be better ways to do this, as I'm not much of a developer myself.

  3. jamshid commented on Dec 30, 2015

    @jamshid

    I wonder if metadata could be stored in file attributes (https://en.wikipedia.org/wiki/Extended_file_attributes), so we don't need a separate/temporary json file.

  4. ncw commented on Dec 30, 2015

    @ncw
    Member

    @jamshid not a bad idea.. I wonder if it can be done in a cross platform way from go...

  5. added this to the milestone on Feb 10, 2016
  6. ncw commented on Jul 22, 2016

    @ncw
    Member

    An implementation idea - we pass the source object to the Put methods. Do a type assertion at that point to break out the metadata - not too tricky.

  7. freedge commented on Jul 29, 2016

    @freedge

    could be stored in file attributes

    @jamshid @ncw that's how it's done when using JClouds with the "filesystem" blob store implementation. For example:

    $ attr -l ./Package_98/Package_98_version_13
    Attribute "user.content-md5" has a 16 byte value for ./Package_98/Package_98_version_13
    Attribute "user.user-metadata.sha1" has a 3 byte value for ./Package_98/Package_98_version_13
    Attribute "user.content-type" has a 19 byte value for ./Package_98/Package_98_version_13
    Attribute "user.user-metadata.package" has a 10 byte value for ./Package_98/Package_98_version_13
    Attribute "user.user-metadata.version" has a 2 byte value for ./Package_98/Package_98_version_13
    

    the user.user-metadata are the custom metadata that are set on the object (in this case that would match the headers x-amz-meta-package, x-amz-meta-sha1,x-amz-meta-version that S3 would return)

  8. added a commit that references this issue on Aug 1, 2016
  9. erik78se commented on Sep 16, 2017

    @erik78se
  10. philip-harvey commented on Jun 14, 2018

    @philip-harvey
  11. modified the milestones: Help Wanted, v1.45 on Oct 17, 2018
  12. modified the milestones: v1.45, v1.46 on Nov 24, 2018
  13. 53 remaining items

  14. upintheairsheep commented on Dec 12, 2022

    @upintheairsheep

    Should there be a separate object for comments and activity, or have them all in the same file

  15. darthShadow commented on Jul 4, 2023

    @darthShadow
    Member

    @ncw Is there anything further pending from this ticket?

    I believe backend-specific metadata implementations should have their own tickets as & when required and there is already a separate ticket for tracking folder metadata: #6685

  16. ncw commented on Jul 4, 2023

    @ncw
    Member

    Yes I agree that this issue is done and that new issues for metadata support for individual backends should be opened as required.

    I'll close this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions