Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around for symbolic link #1665

Open
melsophos opened this issue Jul 3, 2019 · 2 comments
Open

Work around for symbolic link #1665

melsophos opened this issue Jul 3, 2019 · 2 comments

Comments

@melsophos
Copy link

I would like to suggest a work around for symbolic links on Linux (after reading the FAQ). It inspired from what Dropbox looks like doing. This is partially what Cozy does now, but it could be made better I think. This can be summarized in two conditions:

  • upload: behave like if the link was physical, i.e. copy the file it points to or move inside the folder and upload the content
  • download: before downloading the content, check if the target is a symbolic link locally; if yes, don't do anything

I have the impression that the upload part is already implemented. I get errors during the download phase (leading to "conflict" folders). I think this can be a useful work around because it is system independent since, at the end, no informations about the link need to be stored in the cloud. If the files are sync with a Windows system, they will be copied like normal files.

@taratatach
Copy link
Member

Hi @melsophos.

Thank you for your suggestion. There are a couple things I'd like to say though :

  • we don't support symlinks at all, even for uploads. This is due to the fact we don't "watch" for changes in directories outside the Cozy Drive folder. This means that changes happening on the files inside the linked folder would not get synchronised.
  • Cozy Drive is a synchronisation tool and not a backup tool. In this regard, not downloading changes synchronized with the COzy on an other machine would not meet this goal, don't you think?

Thank you again, we'll keep this in mind :).

@melsophos
Copy link
Author

Thanks for the feedback! Some thoughts on the two points:

  • Continuing on the logic I gave, I would say that files and folders inside a symlink should be treated as part of the Cozy folder (i.e. symlinks are traversed recursively and the folder tree obtained is identifier with Cozy folder). But I understand this presents some challenges. I think this is how Dropbox proceeds (at the condition that it is really a tree and that symlinks don't lead to a closed loop of folders).
  • This can depend on how one is working. For example, I am working with two different computers (in different places). I synchronize them through my server and Unison. I also save to Cozy the most important subfolders through a symlink (I don't want to sync the full tree). There are three reasons: 1) to get some backup (but this is exactly Cozy's goal), 2) have them on my tablet/phone, and 3) get the newest files if I forgot to sync through Unison (so real sync). However, each computer is sync on Cozy in a different subfolder: I have to use this complicated architecture since there are conflicts due to symlink otherwise (in Dropbox, I was syncinc just one computer, again because of symlinks, point 2) in my first message was failing). The suggestion above would help having a real synchronization between my folders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants