How to deal with access denied and file in use errors?

To backup user files broadly and not miss obscure locations where users might save things, I’ve set the backup source as C:\Users. It works just fine, but there are always dozens of errors either due to access being denied to Windows files/directories, or because the file is in use by another process (eg. Dropbox log and temp files).

Options considered so far:

I could try writing exclusion rules, but it looks like it will take some effort to address all the issues, and risks unintentionally ignoring more than expected. Plus, there may always be other files in use in the future as different programs are run.

I could also try to be more selective in which directories to include in the repository, but that sounds more difficult than exclusions, and risks not backing up files if users save files in weird locations.

Another option is to check the boxes in kopia-ui to ignore file/directory read errors as non-fatal. This sounds nice for ignoring things like temporary or lock files, but what if there are problems with backing up important files? Failing silently could be dangerous and give a false sense of security.

Yet another option is to just let the errors stay. The problem in this case is that it obscures any real errors and creates a habit of ignoring errors, potentially leading to a bad surprise at recovery time.

Thoughts on how best to deal with these errors?

And is there a way to view all the errors instead of the limited view with a mouse-over on the exclamation icon next to the snapshot?

Just exclude unnecessary stuff. Here is a set of nice filters, ready to use:

1 Like

Thanks for that exclusion list!

Does kopia-ui have a place to select a file with the list of exclusions?

kopia-ui has the exclusion files field in the policy section, but notably, it specifies that it is for file and directory names relative to the directory they are in, and not absolute paths. So, pasting the contents of the exclusion list above does not work.

One important note: kopia uses / not \ as the separator, so those backslashes all have to be replaced.

This resource is helpful for understanding kopia exclusions: Ignoring Files and Folders in Snapshots | Kopia

I got all errors resolved with the following exclusion list. This also reduced the snapshot size by ~2GB, and reduced the number of files by ~25% and the number of directories by ~50%. I might reduce the exclusions later to the minimum needed, for safety and possibly performance.

# Modified from https://github.com/netinvent/npbackup/blob/main/excludes/windows_excludes

LOCK
lockfile
**/AppData/Local/Temp
**/AppData/LocalLow
**/Documents and Settings/**/Cookies
**/Documents and Settings/**/Recent
**/Documents and Settings/**/Local Settings/Temp
**/AppData/Roaming/Microsoft/Windows/Recent
**/AppData/Local/Temp
**/AppData/Local/History
**/AppData/Local/Application Data
**/AppData/Local/Microsoft/Internet Explorer
**/AppData/Local/Microsoft/Windows/History
**/AppData/Local/Microsoft/Terminel Server Client/Cache
**/AppData/**/Temp
**/AppData/Roaming/Microsoft/Windows/Themes/CachedFiles
**/AppData/Internet Explorer
**/AppData/**/Microsoft/**/InetCookies
**/AppData/**/Microsoft Office/**/OfficeFileCache
**/AppData/**/Microsoft Office/**/WebServiceCache
**/AppData/**/Microsoft Office/**/Lync/Tracing
**/AppData/**/Microsoft Office/**/Recent
**/AppData/Local/Microsoft/Office/*OfficeFileCache
**/AppData/Local/Microsoft/Office/Recent
**/AppData/Local/Microsoft/Outlook/RoamCache
**/AppData/LocalLow/Microsoft/CryptnetUrlCache
**/AppData/Local/Downloaded Installations
**/AppData/Local/GroupPolicy
**/AppData/Local/Microsoft/AppV
**/AppData/Local/Microsoft/Messenger
**/AppData/Local/Microsoft/OneNote
**/AppData/Local/Microsoft/Terminal Server Client
**/AppData/Local/Microsoft/UEV
**/AppData/Local/Microsoft/Windows Live
**/AppData/Local/Microsoft/Windows Live Contacts
**/AppData/Local/Microsoft/Application Shortcuts
**/AppData/Local/Microsoft/Notifications
**/AppData/Local/Microsoft/Windows/UsrClass.dat.LOG*
**/ntuser.dat.LOG*
**/Temporary Internet Files
**/AppData/**/Microsoft/Windows/INetCache/*
**/AppData/Local/ElevatedDiagnostics
**/AppData/Local/Microsoft/Windows/UsrClass.dat*
**/AppData/Local/Packages/**/*.dat*
**/NTUSER.DAT*
**/AppData/Local/Microsoft/Windows/Burn
**/AppData/Local/Microsoft/Windows/CD Burning
**/AppData/Local/**/*Cache*
**/AppData/LocalLow/**/*Cache*
**/AppData/Roaming/**/*Cache*
**/AppData/Local/**/*Temp*
**/AppData/LocalLow/**/*Temp*
**/AppData/Roaming/**/*Temp*
**/OfficeFileCache
**/SmartLookupCache
**/BackstageInAppNavCache
**/MruServiceCache
**/AppData/Local/Microosft/Windows/WER
**/AppData/Local/CrashDumps
**/AppData/Local/Diagnostics
**/AppData/Local/Microsoft/Windows/*Cache
**/MicrosoftEdgeBackups
**/AppData/Local/MicrosoftEdge/SharedCacheContainers
**/AppData/Local/Microsoft/Edge/User Data/Default/DawnCache
**/AppData/Local/Packages/**/AC
**/AppData/Local/Packages/**/TempState
**/AppData/Local/Packages/**/LocalState
**/AppData/Local/Packages/**/LocalCache
**/AppData/Local/Packages/**/RoamingState
**/AppData/Local/Packages/**/AppData/User/Default/CacheStorage
**/AppData/Local/Packages/**/AppData/CacheStorage
**/AppData/Local/Package Cache
**/AppData/Local/Microsoft/WindowsApps
**/AppData/Local/Microsoft/Windows/Notifications
**/AppData/Local/Microsoft/Windows/Explorer
**/AppData/Roaming/Microsoft/Windows/Cookies
**/NetHood
**/PrintHood
**/Cookies
**/Recent
**/SentTo
**/LocalService
**/NetworkService
**/AppData/LocalLow
**/Tracing
**/AppData/Local/Microsoft/Office/OTeleData*
**/AppData/**/Local Storage
**/AppData/**/Session Storage
**/AppData/**/Crash Reports
**/AppData/**/sessionstore/.bak
**/AppData/**/DawnCache
**/AppData/**/Chrome/User Data/**/LOG
**/AppData/**/Chrome/User Data/**/File System
**/AppData/**/Chrome/User Data/**/SwReporter
**/AppData/**/Chrome/User Data/**/PepperFlash
**/AppData/**/Opera/Opera/profile/cache4
**/AppData/Roaming/Opera Software/**/Sessions
**/AppData/Roaming/Opera Software/**/LOG
**/AppData/**/Vivaldi/User Data/Application
**/AppData/**/Vivaldi/User Data/LOG
**/AppData/Local/Thunderbird/Mozilla Thunderbird/updates
**/AppData/Roaming/Thunderbird/Profiles/**/crashes
**/AppData/Local/Google/Google Apps Sync/Tracing
**/AppData/Local/Adobe/AcroCef/DC/Acrobat/Cache
**/AppData/Local/webEx/wbxcache
**/AppData/**/Zoom
**/AppData/Local/Dropbox
**/AppData/Local/D3DSCache
1 Like

Thanks for remarks. You’re right, Kopia filters are slightly different from Rustic ones (relative vs absolute paths). I stand corrected. Btw, they are “worked” in my setup, because they are “mixed-in” with other parent filters, so, good find!