General Category => Feature Requests => Topic started by: cm_gui on February 20, 2007, 01:33:41 PM

Title: command to move objects?
Post by: cm_gui on February 20, 2007, 01:33:41 PM
Hi Greg

Is it possible to have a command to move objects from one location to another on the Amazon S3 server?

S33r is able to do this, but I prefer s3cmb/s3sync.

Thank you.


Title: Re: command to move objects?
Post by: lowflyinghawk on February 20, 2007, 03:49:24 PM
fyi, moving an object means retrieving it and then PUTting it to the new key.  s3 provides no other means of doing this.  it is fine for small objects, but very painful for big ones.  it would be possible to build something on top of s3 that had the necessary bookeeping, in other words a layer of indirection, but it wouldn't be easy to make it reliable.

Title: Re: command to move objects?
Post by: ferrix on February 20, 2007, 04:04:16 PM
As lfh says, there's no way to do this without an indirection between the names and contents.  Because one of the design goals of s3sync is to have transparent (direct) naming of its nodes, it is not possible to implement this. 

I'm not sure how your other tool does it (via indirection, or by doing another upload followed by a delete).  But either way there won't ever be a "move" operation in s3sync for above stated reasons.

Title: Re: command to move objects?
Post by: luke on September 06, 2010, 05:00:41 PM
According to Amazon this is supported.  Looks like its done by doing a put where the source is a also in s3, if you copy within locations there is no charge which is ideal (well it costs two reqeusts, copy and delete original but way better that download and re-put it).  This tool doesn't support that option though.  I'm no Ruby developer otherwise I'd have a go.  I assume this is a new-ish feature as none of the perl libraries I've been looking at support this either.  The article I was reading is;