S3Sync.net

General Category => Questions => Topic started by: michela on October 29, 2007, 07:16:42 PM



Title: inconsisent sync behavior
Post by: michela on October 29, 2007, 07:16:42 PM
Hi, I'm getting inconsistent behavior trying to mirror files to S3.  After the following, /etc seems to be mirrored correctly. /home is mirrored but no symlinks are followed. Just the file is stored for the symlinked dir. And /usr/share/trac (dir) is stored as a file.



./s3sync.rb -rd  /etc <bucket>:

./s3sync.rb -rd  /home <bucket>:

./s3sync.rb -rd  /user/share/trac <bucket>:user/share

where <bucket> is name of bucket

Any ideas why the latter? Perms look fine.

Thanks
   .M.



Title: Re: inconsisent sync behavior
Post by: ferrix on October 30, 2007, 02:11:27 AM
To store info about a directory we store a node.  This is not to imply that a "file" is stored for it, S3 doesn't have concept of files and dirs, only nodes and URIs.

S3sync never "follows" symlinks as this would make the restore operation incorrect.  It saves the symlink in a way that will restore as a symlink.

Now let's talk about "trac": Is it a symlink too?  If not, can you verify with s3cmd list that in fact nothing else is stored but the directory node?  That sounds like either a bug or some non-understood behavior.


Title: Re: inconsisent sync behavior
Post by: michela on October 30, 2007, 07:24:32 AM
Ah ok, I understand what's going on.. trac was a non-existent file.

This command

./s3sync.rb -rd  /user/share/trac <bucket>:user/share

produced a node /user/share/trac even though /user/share/trac doesn't exist (user, not usr, was typo)

This behavior is confusing. It would be better if there was a debug write reflecting the Linux error message (e.g. "/user/share/trac: No such file or directory")

and no node was produced. I can't see the point of creating a node in this instance and typos/incorrect usage will clog up people's buckets.

Thanks 
   .M.


Title: Re: inconsisent sync behavior
Post by: ferrix on October 31, 2007, 04:33:17 AM
I agree that behavior doesn't seem to be beneficial :)