Syncing symlinks/hardlinks/junctions/etc.. - how does it work?

Hi,

I would like to ask how odrive handles hardlinked files (on Windows 7).
Why I ask: I have MyDocs_folder that contain many subfolders and files. It occupies much more space than I have available in my OneDrive. Moreover, not all files are necessary to be synced with cloud.

Therefore, in order to save disk space, I wanted to create hardlinks in my local Odrive folder to some of the files I want to sync. My question is: What will happen if any of the files is updated in OneDrive? Will be the hardlink preserved or will a new copy created in Odrive folder?

For example:

MyDocs_Folder\many folders and files
MyDocs_Folder\folder_I_want_to_sync\file_I_want_to_sync

Odrive_folder\folder_I_want_to_sync\file_I_want_to_sync (hardlinked)

OneDrive_folder\folder_I_want_to_sync\file_I_want_to_sync

Now, if I update file_I_want_to_sync in my OneDrive_folder, what will happen when the file is synced by Odrive? Will be the updated version also in MyDocs_Folder? Or will I have two copies: a newer in Odrive_folder and the old one in MyDocs_folder?

It would be great if Odrive respected hardlinks so that I could have the latest copy also in the source MyDocs folder.

Thanks a lot for your explanation.

Hi,
Good questions.

We don’t officially support user-created junctions/symlinks/hardlinks for a number of reasons. The short of it is that the behavior can be unpredictable and users can get into some disastrous situations in certain circumstances, especially with certain types of storage sources. I saw a case during my testing where the entire source folder was destroyed after a remote rename of a symlinked directory. It also complicates sync substantially and can create issues with reflection/pick-up of changes, issues with permissions, CPU heat, disk churn, inaccurate scans, and other problems.

We spent a lot of time working on “sync to odrive” to officially support and facilitate these types of relationships. With “sync to odrive” you can target any local directory and have that sync to any location in your odrive-linked storage. You can find out more about that here: https://docs.odrive.com/docs/manage-sync#section-sync-external-folders

The “sync to odrive” mapping is a safest and most reliable way to facilitate this type of a relationship. Since we are dealing with user data, which we hold sacred, we want to make sure this type of advanced setup is possible, but done correctly.

This all being said, it is your system and you are free to do whatever you feel is best for your own use case and skill level. Technically you may be able to get these types of file system-level links to work, but it is not something we test anymore.

Hi.
Thank you very much for detailed explanation. I understand that working with junctions/symlinks/hardlinks can create many hardly predicted situations. As far as I understand, the Pro Sync does not support junctions/symlinks/hardlinks. Rather, it enables user to sync individual folders wherever they are.

Is my understanding correct? Or does the sentence “we… officially support and facilitate these types of relationships” mean that it supports also junctions/symlinks/hardlinks?

Yes, your first conclusion is correct. We create the relationships without using these types of links, using our own technology.