Directory junction

I trying to use Duplicacy on the NTFS folder with directory junction inside.
My testing backup job was done without any error or warning.

Then I trying to restore my snapshot and found some inaccuracy. All directory junction inside backup folder was restored as symlink, moreover it is symlink to file, not to folder. As a result restored symlink become useless. It’s opened with error, because it restored as regular file symlink, not directory symlink, but pointed to directory of course.

Is this a bug, or I miss some options regarding this subject ? Most backup programs have dedicated option to choose how to handle junction points. Pass it thru, copy as is or ignore. What about duplicacy ? Do I miss something ?

1 Like

What you think @saspus bug ?

Afaik junctions are not supported and should be skipped. Duplicacy only follows first level symlinks, to enable the usecase of backing up a collection of files and folders scattered all over the place without needing to create multiples of repositories.

On windows most common usecase that invokes junctions is OneDrive when full sync is not enabled. In these scenarios it’s recommended to exclude the OneDrive folder from the backup, as the content of the backup will no longer be deterministic — as some files are missing.

Arq7 supports this usecase, by having the option to materialize cloud only files. Here is the feature request for duplicacy: Support for dataless files

Hopefully handling of OneDrive related reparse points and junctions could be handled as part of this. But I don’t this it has been scheduled.

Not only OneDrive used junction, some other programs too. Moreover users can make junction themselves. Why you can’t make separate option for junction handling when making new storage ? You can leave current behavior as default, but give user a choise how to handle their junction.

We are going in circles here. Please read my comment above from 5 months ago.

This is incorrect. OneDrive uses reparse points, not junctions.

Every junction is a reparse point but not every reparse point is a junction.

Reparse points on NTFS are a way to extend the filesystem; they contain data that can be interpreted by a filesystem filter. OneDrive uses them to implement dataless files. Backing that up is pointless — information there can be instance specific. Instead, the dataless file content should backed up — see above.

Nothing is impossible. Duplicacy behavior is to follow only first level symlinks, by design.