Backup AppData on Windows

hi,

I want to backup my AppData/Roaming folder, but I get many erros that files are locked by the software. Makes sense, but I used other backup-software before which are able to create backups while windows is running. Can’t I backup the AppData with Kopia ?

Most likely you have to use filesystem snapshots (aka shadow copy) which can be done using kopia actions.

More info in docs:

So this cant be done with KopiaUI ?

Create you shadow copy scripts and configure them in UI (part of policies):

Read docs to understand all process. Actions have to be enabled first (they are off by default for security reasons).

1 Like

I created the scripts, added them to the Actions tab and enabled in the config, restarted KopiaUI but still get the errors :confused:

Maybe scripts in docs are not perfect. Search forum for other examples.

Also AFAIK some apps in Windows do not support shadow copy. You can exclude them or use recommended backup process.

All the files that reported as locked for my AppData were not needed for backup so I excluded them (KopiaUI > Policies > Files > Ignore Files). Plus you probably want to exclude unnecessary cache folders, etc.

Here’s a starter list:

# Modified from https://github.com/netinvent/npbackup/blob/main/excludes/windows_excludes
**/$RECYCLE.BIN
**/IconCache.db
**/MusicBee/**/InternalCache
AppData/**/Crash Reports
AppData/**/DawnCache
AppData/**/Local Storage
AppData/**/Session Storage
AppData/**/Zoom
AppData/**/sessionstore
AppData/Internet Explorer
AppData/Local/**/*Cache*
AppData/Local/**/*Temp*
AppData/Local/**/*cache*
AppData/Local/**/*temp*
AppData/Local/AMD*
AppData/Local/Amuse
AppData/Local/ATI
AppData/Local/Adobe
AppData/Local/Application Data
AppData/Local/Chromium
AppData/Local/Comms
AppData/Local/CrashDumps
AppData/Local/Diagnostics
AppData/Local/Downloaded Installations
AppData/Local/Dropbox
AppData/Local/ElevatedDiagnostics
AppData/Local/Google
AppData/Local/GroupPolicy
AppData/Local/History
AppData/Local/Microsoft
AppData/Local/Microsoft_Corporation
AppData/Local/Mozilla
AppData/Local/Package Cache
AppData/Local/PackageManagement
AppData/Local/Packages
AppData/Local/Programs
AppData/Local/REDEngine
AppData/Local/Temp
AppData/Local/UniGetUI
AppData/Local/kopia*
AppData/Local/resmon.resmoncfg
AppData/Local/setup
AppData/Local/upscayl-updater
AppData/LocalLow
AppData/Roaming/**/*Cache*
AppData/Roaming/**/*Temp*
AppData/Roaming/**/*cache*
AppData/Roaming/**/*temp*
AppData/Roaming/**/parent.lock
AppData/Roaming/EasyAntiCheat
AppData/Roaming/Microsoft
AppData/Roaming/Mozilla/Firefox/Background Tasks Profiles
AppData/Roaming/Mozilla/Firefox/Crash Reports
AppData/Roaming/Mozilla/Firefox/Pending Pings
AppData/Roaming/Mozilla/Firefox/Profiles/**/storage/default
AppData/Roaming/steelseries-gg-client
Application Data
BackstageInAppNavCache
Contacts
Cookies
Favorites
LOCK
Links
Local Settings
My Documents
NTUSER.DAT*
NetHood
NetworkService
OfficeFileCache
PrintHood
Recent
Searches
SendTo
Start Menu
Templates
lockfile
ntuser.dat*
ntuser.ini
2 Likes

I’ve created a powershell-script to shut down some softwares for the backup. The script itself works, but it is not running by Kopia when I set the path in “Before Folder”. what am I doing wrong ? Maybe thats also the reason with the script from the doc it was not working. Path “C:\Users\user\AppData\Roaming\script.ps1” and also just “script.ps1” when I back up the folder Roaming is not working.

You probably want “Snapshot Actions” and not “Folder Actions”. File system snapshot before folder does not make much sense.