Repair and Rebuild database fails: Unexpected difference in fileset

Did this happen?

Of course - I’m not making things up. But since this error appeared only once, I suspect the reason might have something to do with the logfile not being in write-mode. Maybe the logfile was still open in a texteditor, or the texteditor didn’t close correctly…
However, I can access the logfile manually now. Going back to the timestamp, I see most errors relate to Sharepoint, Dropbox and googledrive:

2019-01-30 20:25:25 +01 - [Warning-Duplicati.Library.Main.Operation.Backup.FileBlockProcessor.FileEntry-PathProcessingFailed]: Failed to process path: C:\Users\XXX\Dropbox (YYY).dropbox.cache\qebcobkqbgpbzfynfuwbof\placeholder.ai
System.IO.IOException: (1920) Das System kann auf die Datei nicht zugreifen: [\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy40\Users\XXX\Dropbox (YYY).dropbox.cache\qebcobkqbgpbzfynfuwbof\placeholder.ai]
bei Alphaleonis.Win32.NativeError.ThrowException(UInt32 errorCode, String readPath, String writePath)
bei Alphaleonis.Win32.Filesystem.File.CreateFileCore(KernelTransaction transaction, String path, ExtendedFileAttributes attributes, FileSecurity fileSecurity, FileMode fileMode, FileSystemRights fileSystemRights, FileShare fileShare, Boolean checkPath, PathFormat pathFormat)
bei Alphaleonis.Win32.Filesystem.File.OpenCore(KernelTransaction transaction, String path, FileMode mode, FileSystemRights rights, FileShare share, ExtendedFileAttributes attributes, Nullable`1 bufferSize, FileSecurity security, PathFormat pathFormat)
bei Duplicati.Library.Snapshots.SystemIOWindows.FileOpenRead(String path)
bei Duplicati.Library.Main.Operation.Backup.FileBlockProcessor.<>c__DisplayClass1_0.<b__0>d.MoveNext()

and

2019-01-30 20:25:17 +01 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: C:\Users\YYY\Documents\XXX\Sharepoint\SharePoint\Admin - Documents
System.IO.IOException: (19) Das Medium ist schreibgeschützt: [\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy40\Users\YYY\Documents\XXX\Sharepoint\SharePoint\Admin - Documents*]
bei Alphaleonis.Win32.NativeError.ThrowException(UInt32 errorCode, String readPath, String writePath)
bei Alphaleonis.Win32.Filesystem.FindFileSystemEntryInfo.FindFirstFile(String pathLp, WIN32_FIND_DATA& win32FindData)
bei Alphaleonis.Win32.Filesystem.FindFileSystemEntryInfo.d__31.MoveNext() bei System.Linq.Buffer1…ctor(IEnumerable1 source) bei System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
bei Duplicati.Library.Snapshots.WindowsSnapshot.ListFiles(String localFolderPath)
bei Duplicati.Library.Utility.Utility.d__23.MoveNext()

I’m happy to exclude the Sharepoint from backup, but my attempts failed for some reason earlier. In the configuration of duplicati => Source Data => Filters => Exclude Folders.
I excluded the corresponding folder just now once again, and it works: I receive “only” 105 warnings. Most (possibly all?) of them relate to googledrive and dropbox. Both should get backed up. Find below the error related to googledrive (the dropbox error is identical to the one from a few weeks ago):

2019-02-14 22:06:34 +01 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: C:\Users\XXX\Google Drive
System.UnauthorizedAccessException: (5) Zugriff verweigert: [\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy14\Users\XXX\Google Drive*]
bei Alphaleonis.Win32.NativeError.ThrowException(UInt32 errorCode, String readPath, String writePath)
bei Alphaleonis.Win32.Filesystem.FindFileSystemEntryInfo.FindFirstFile(String pathLp, WIN32_FIND_DATA& win32FindData)
bei Alphaleonis.Win32.Filesystem.FindFileSystemEntryInfo.d__31.MoveNext() bei System.Linq.Buffer1…ctor(IEnumerable1 source) bei System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
bei Duplicati.Library.Snapshots.WindowsSnapshot.ListFiles(String localFolderPath)
bei Duplicati.Library.Utility.Utility.d__23.MoveNext()

The --snapshot-policy=required will get access to locked files but won’t get past Windows access control. For that, the usual solution would be to run Duplicati as SYSTEM which is default for its Windows service, however I’m assuming YYY is not SYSTEM (otherwise why obscure?). It’s probably at least Administrator group, otherwise --snapshot-policy=required would have an error, but might not really be running elevated. Some people dislike running as SYSTEM because it’s too powerful. I don’t know if you have such reasons.

I’d be happy to run duplicati elevated. This is what the taskmanager shows:


Not sure what this means for my case.

If you don’t in fact want the SharePoint files, you could exclude them. I’m not sure what the goal is besides NOT having 170 warnings. I’m also not sure if there are also warnings beyond what SharePoint files made

Good point! As you mentioned yourself: sometimes errors/warnings are like symptoms of a real problem. 170 Warnings make it quite difficult to track (real) problems.

Here is my conclusion so far: Duplicati has problems accessing the files which are mirrored in the cloud. Snapshotpolicy=required does not do the trick, although duplicati is running as a SYSTEM. I think this is odd, since all files of googledrive, dropbox and sharepoint are problematic - although they are not accessed/synced, while duplicati is running its backup.