Are there any typical .kopiaignore configurations for Linux and Windows?

Hi! I recently stepped over kopia when looking for an alternative to the unmaintained BackInTime and I fell in love :heart:

For me, it took some time to figure out, what should be ignored in the backups. Of course, this surely depends a lot upon the use case. But I guess that there might be a typical set of files that can typically be ignored under Linux or Windows.

I post here the config I’m currently using to backup my home dir (both for Linux and Windows). Suggestions are welcome!

Have you thought about including typical configs you can easily as basis to create your own policies?

BTW: The policy “ignore well-known cache directories” is described by “ignore directories containing CACHEDIR.TAG and simliar”. What exactly is ignored when I set this to true?

.gvfs/
.cache/
cache/
cache2/
caches/
Cache*/
*Cache/
.thumbnails*/
.local/share/[Tt]rash*/
$RECYCLE.BIN/
*.backup*
*.bak
*~
.~*#
~*.xlsx
~*.docx
~*.pptx
tmp/
temp/
Temp/
.dropbox*/
.pub_cache/
.Private/
node_modules/
.meteor/local/
.meteor/packages/
.meteor/packages-metadata/
Local Storage/
Session Storage/
blob storage/
2 Likes

In case you want to backup your complete Linux system, you might want to add

/dev
/etc/mtab
/home/*/.cache/*
/media
/mnt
/proc
/run
/sys
/timeshift
/var/cache
/var/crash
/var/lib/flatpak
/var/lock
/var/log
/var/run
/var/spool
/var/tmp
/lost+found
1 Like

@peter I think this might be a good place to start building the list. You already have a few things going on, here’s what I have for backing my linux home directory:

.android
.audacity-data
.cache
.cargo
.cddb
.config/chromium
.julia 
.local/bin
.local/share/baloo
.local/share/Steam
.npm
.pki
.steam
*.socket
.Xauthority
.steampid
.steampath

In this, .socket files are particularly required as they are locked by systemd, so Kopia will have errors backing them up.

2 Likes

Thanks for adding your version :slight_smile:

On Windows, here is my ignore for my home directory:

.atom
.cache
.eclipse
.p2
.vscode
.ipython
.jupyter
.openjfx
AppData/Roaming/Adobe
AppData/Roaming/AMD
AppData/Roaming/Code
AppData/Local
AppData/LocalLow
AppData/Roaming/Macromedia
AppData/Roaming/Microsoft
AppData/Roaming/Origin
AppData/Roaming/kopia*
AppData/Roaming/Teams
miniconda3
NTUSER.*
ntuser.*

Do you guys know of applications or CLI commands that give total disk space utilized by a list of folders, in windows as well as Linux?

For Windows I like to use WinDirStat, for Linux ncdu.

2 Likes

I use both of them! But instead of providing total space from a given folder+child folders, I was looking for a way to input a list of folders (my excluded folders)

Ah, sorry, I misunderstood. For linux it might be useful to use:

du -csh `cat folders.txt`

(or simply list the folders after du -csh).

1 Like

Quick question, how would one correctly capture all of these exclusions:
“cache/”,
“.cache/”,
“Cache/”,
“.Cache/”,
“Caches/”,
“.Caches/”,
With this?
/[.][Cc][Aa][Cc][Hh][Ee]/”