Backup that includes OneDrive folder fails with an error similar to one of the following:
Failed to enumerate directory 'C:/Users/myusername/OneDrive/'. It may be corrupted or does not exist
Failed to back up file or folder 'C:/Users/myusername/OneDrive/'.It may be blocked by another application
Error occurred while opening the file
Access to the cloud file is denied
The file is read-only
Recovery of OneDrive folder fails with:
Failed to recover file or folder
Microsoft OneDrive has a feature to save the local disk space by keeping only the links to files on computer, and moving the actual files to Microsoft OneDrive Cloud storage. The option is called "Files On-Demand" in OneDrive settings. The links it creates (NTFS reparse points) cause backup to fail. The OneDrive folder becomes a NTFS reparse point too.
Exclude OneDrive folder from the backup by adding the path to the OneDrive folder, e.g. C:\Users\MyUserName\OneDrive to the Exclusions list in the backup options:
1. Click Backups on the left action pane
2. Select the backup that fails
3. Click "Options"
4. Click on the Exclusions tab
5. Click the plus sign to add a new exclusion rule
6. Click on the icon with three dots at the right to open the "Browse" dialog box
7. Navigate to C:\Users\<your user name>\OneDrive in the opened dialog box and click on "OneDrive" folder to select it
8. Click OK to close the dialog box
9. Click OK to save the changes to the backup task and exit the edit mode
If you do not need online-only files feature of OneDrive, you can turn it off by unticking the "Files On-Demand" option in OneDrive settings. It will allow Acronis True Image to backup the contents of OneDrive folder succcessfully.
1. Click the OneDrive icon in the system notification area (system tray)
2. Click on the three dots icon to open the menu
3. Select "Settings":
4. Click on the "Settings" tab in the opened window
5. Uncheck the option "Save space and download files as you use them"
6. Click OK to save changes
7. Wait until files that were online-only download to your computer and the OneDrive icon changes from this:
8. Verify that OneDrive folder stopped being a reparse point: open Windows Start menu, type cmd, right-click the found "Command Prompt" and select "Run as administrator"
Run the following command in the opened window, replacing MyUserName with your Windows account name:
fsutil reparsepoint query "C:\Users\MyUserName\OneDrive"
If the error message in Acronis True Image pointed to a sub-folder inside OneDrive rather than to the OneDrive folder itself, use the path to that folder instead, for example:
fsutil reparsepoint query "C:\Users\MyUserName\OneDrive\My Folder"
To learn more about this command, visit https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-reparsepoint
8a. If the text output line is "Error: The file or directory is not a reparse point.", then it means that this folder is no longer a reparse point and can be backed up successfully with Acronis True Image.
Launch Acronis True Image and start the backup. If the backup succeeds, skip to p.10. In case it fails again, notice if the error message now points to a different subfolder in the OneDrive directory.
8b. If the output of fsutil command starts with "Reparse Tag Value" and is similar to the following, it means that it is still a reparse point that will fail to backup:
8c. If the output starts with "Reparse Tag Value", when you have already disabled the Files On-Demand feature, some other application must be using files inside OneDrive folder. In such case try rebooting the computer and then run the fsutil command to see if OneDrive folder or its subfolder stopped being a reparse point.
If you keep seeing "Reparse Tag Value" in the output, try re-enabling Files On-Demand feature, then reboot the computer and then disable Files On-Demand feature again. This second cycle of disabling will ensure that there will be no online-only files that could remain locked by other applications and not converted back to a regular folder.
9. Start the backup in Acronis True Image and see if it now succeeds.
10. (Only for owners of Acronis True Image 2018): Check if the OneDrive folder contents was actually backed up by clicking on "Recovery" tab and browsing to OneDrive folder. If the backup succeeded, but OneDrive contents is missing in the backup, that must be due to the behavior described at https://kb.acronis.com/content/61425. In such case please uninstall the current version of Acronis True Image, download build #11530 from https://account.acronis.com/#/products and install build #11530.
Acronis True Image 2019 and later versions, including Acronis Cyber Protect Home Office, allow to back up contents of personal OneDrive accounts via special cloud-to-cloud backup. See How to back up Microsoft 365 accounts