When backing up OneDrive files the backups fail with the following error:
[ERROR] [08/04/2019 10:01:05] [[/C/Users/profilename/OneDrive/Documents/filename.doc][There is no permission to backup the file]]
In order for file backups to work the OneDrive files must always be available on the device. OneDrive gives you the option to make files always available on the device, available on the device or cloud only. When the file is set to cloud only it causes the backup to fail because the contents of the entire file are not on the device.
For reference, here is a Microsoft link on how OneDrive works.
Right click the file in OneDrive and select “Always keep on this device”.
To make the file always available on the device using command line (CMD) use the following:
attrib -U +P /s “filename.ext”
To make the file available on the device using command line (CMD) use the following:
attrib -U +P /s “filename.ext” then attrib -U -P /s “filename.ext”