[owncloud-devel] Should we sync hard links?

Olivier Goffart olivier at owncloud.com
Tue Jun 30 14:29:28 GMT 2015


Historically we have not sync'ed hard links. The sync client just ignores 

However, there are some good use case to sync them anyway: 
In that bug, NTFS filesystem mounter from linux have hardlinks and therefore 
you cannot sync a folder on NTFS on linux.

So I was wondering if we should just change the code an just synchronize hard 

I'm only talking about hard links, NOT symbolic links.
Hard links are two files with the same inode and the same contens on the same 
file system.
I don't really know what is the use cases for hard links. It is often cited as 
a way to save space if two files share the same contents. 

Anyway, what would be the consequencies of not ignoring hard links?
Well, they would simply be uploaded to the server.  If there are two linked 
files within the sync directory, the two would be synced independently.
(This waste a bit of bandwidth but i think it's ok)

When a file is updated on the server, we would just download it and break the 
link. (because we download and move, the link will be removed)

Even in case of rename the sync would not be dusrupted.

So the question is:  Is there any use case in which not ignoring hard links 
would break things?


More information about the Devel mailing list