OneDrive Files on Demand - symlinks not readable

not-planned
onedrive

#1

Hello,
I had setup a repositiory to backup my OneDrive files to a local external hardrive using symlinks. I have just switched on using OneDrive’s Files on Demand feature. Now I none of my symlinks are readable and I cannot backup any files. I have the Files on Demand setup with “Online only”, “Available”, and “Always keep on device” and none of these settings work. I had thought that at least I could backup the folders/files marked as “Always keep on device”, but I can’t.

For informatiom I use also Cryptomator and previously they had problems also with Files on Demand and they found that their was some changes to the java which caused their problems but could fix in the end (not sure if this helps, just wanted to convey that other software has problems with Files on Demand).

Below are sample error messages:

Failed to read the symlink: readlink C:\OneDrive\Attachments: The system cannot find the file specified.
Failed to read the symlink: readlink C:\OneDrive\Audio Books: The system cannot find the file specified.
Failed to read the symlink: readlink C:\OneDrive\Books: The system cannot find the file specified.
Failed to read the symlink: readlink C:\OneDrive\Books2: The system cannot find the file specified.
Failed to read the symlink: readlink C:\OneDrive\Documents: The system cannot find the file specified.

Cheers and thanks


#2

Not sure why but my guess is that Microsoft uses a special kind of reparse point for those symlinks. I’ll take a look.


#3

Has this been fixed?


#4

Yes, MSFT does create a reparse point for On-demand OneDrive, and none of the backup tools known to me allow to select to backup that, including MSFT own File History.

I also completely agree with this apparently deliberate approach: when on-demand sync is enabled the backup stops being deterministic and therefore reliable: some files (locally modified) get backed up. Some files (that you edited in the cloud) don’t. Some files will never be even synced.

I’d rather like current behavior of refusing to even touch that. If user needs a backup of cloud files – let them sync entire folder somewhere and backup that.

Unless duplicacy decides to support backing up from cloud to cloud directly. (Which it should not, and it’s off topic anyway)

Edit. I was trying to say that in my opinion it should not be “fixed”/supported as doing so will create an opportunity for almost certain data loss.


#5

Okay, thanks for explaining. I agree with your suggestion of not changing anything. @gchen, I’m tagging this #not-planned. If you disagree, please remove the tag.


#6

Yes, #not-planned. Since this type of reparse points aren’t documented, I don’t even know how to find out what the target is if we need to back up the target directory.


#7

Well it seems it is possible to backup the files using the GUI but not the CLI.

I recently reset my OneDrive. After when I ran the GUI to test the backup, the GUI started to download the cloud files. I then pressed "cancel", after which I was given the option to "block the App" from downloading files, so I decided to block the GUI from downloading cloud files.

When I ran the GUI backup again, it skipped the cloud files saying that it "could not open the xxx file", (i.e. The cloud file), but that is ok, and it continued to pack and backup up the files which were already available offline on my hard drive. Exactly what I wanted.

Unfortunately the CLI breaks with an error.

It would be good if "blocking the app from downloading cloud files" could be built into duplicacy and not show any "file could not be opened" error.

Now my Question: Since the GUI will not be developed and will become browser based, will a similar scenario be available to backup the files?


#8

I would also be interested in an option to exclude files which are not locally available e.g. OneDrive files on Demand.
Information on the various file attributes related to this can be found here. In particular FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS for files and FILE_ATTRIBUTE_RECALL_ON_OPEN for directories.

There is further analysis of these file attributes here.

Without this, on a multi-user computer, where each user is using OneDrive files on demand, there is no way to backup the entire drive. Files cannot be restored by a different user, you receive the error “The cloud file provider is not running.” is duplicacy exits with an error.

Being able to backup just the files that are locally available would resolve this.