S3Sync.net

General Category => Questions => Topic started by: napes on October 17, 2007, 02:42:50 PM



Title: Restoring Data - unlink: Operation not permitted
Post by: napes on October 17, 2007, 02:42:50 PM
Hi,

I'm trying to restore some files originally synced using s3sync but I'm encountering the error:

source: <Dir Name>
local node object init. Name:<Dir Name> Path:<Local Directory><Dir Name> Size:38 Tag:d66759af42f282e1ba19144df2d405d0
Create node <Dir Name>
./s3sync.rb:621:in `unlink': Operation not permitted - <Local Directory><Dir Name> (Errno::EPERM)

where <Local Directory> is the directory the file should be copied to and <Dir Name> is the directory name. The local system is running Mac OS 10.4. I'm not sure if this has any effect though.

Has anyone encountered this before or know how to fix it?

Thanks,

Napes


Title: Re: Restoring Data - unlink: Operation not permitted
Post by: napes on October 27, 2007, 06:46:19 AM
I've worked out what's causing the problem:

If two nodes exist with the same name, for example:

/backup/files/monkey

and sometime later

/backup/files/monkey

then the sync exits on an error trying to recreate the second node as, I assume, it violates the internal model - two identical directories with differing object IDs.

So far I have used s3 Browser for OS X to remove the duplicates and everything seems to be running again. Unfortunately I don't have time to suggest a patch for the existing code.


Title: Re: Restoring Data - unlink: Operation not permitted
Post by: ferrix on October 27, 2007, 06:05:36 PM
If you can create a self-contained test case that demonstrates the bug I can take a look at it.  Otherwise it's too much trouble to figure out what you're doing to get the result  ;)