# ============================================================================== # Restic Exclude Patterns for Linux $HOME # ============================================================================== # Usage: # restic backup /home/$USER \ # --exclude-file=/path/to/excludes.txt \ # --exclude-caches \ # --exclude-if-present .nobackup \ # --one-file-system # # Dry-run check: # restic backup /home/$USER --exclude-file=excludes.txt --exclude-caches --dry-run -v # ============================================================================== # ------------------------------------------------------------------------------ # 1. System, Desktop Caches & Trash # ------------------------------------------------------------------------------ .cache **/.cache .thumbnails **/.thumbnails .local/share/Trash **/.Trash* .local/share/baloo .dbus .gvfs .xsession-errors* # ------------------------------------------------------------------------------ # 2. Browser & Messaging Caches (outside ~/.cache) # ------------------------------------------------------------------------------ .mozilla/firefox/*/Cache .mozilla/firefox/*/minidumps .mozilla/firefox/*/saved-telemetry-pings .config/google-chrome/*/Application Cache .config/google-chrome/*/Service Worker/CacheStorage .config/google-chrome/*/Default/GPUCache .config/chromium/*/Application Cache .config/discord/Cache .config/discord/Code Cache .config/Slack/Cache .config/Slack/Service Worker/CacheStorage .config/Spotify/Users/*/Data # ------------------------------------------------------------------------------ # 3. Development: Dependencies, Package Managers & Build Artifacts # ------------------------------------------------------------------------------ # Generic build / dependencies **/node_modules **/bower_components **/vendor **/.venv **/venv **/env **/__pycache__ **/*.pyc **/.pytest_cache **/.mypy_cache **/.ruff_cache **/.tox # Language package caches & tools .npm .yarn/cache .pnpm-store .cargo/registry .cargo/git **/target/debug **/target/release .rustup/toolchains .gradle/caches .gradle/daemon .gradle/wrapper .m2/repository .go/pkg .cache/go-build .nuget/packages .gem .bundle/cache # ------------------------------------------------------------------------------ # 4. Containers, VMs, Flatpak & Wine # ------------------------------------------------------------------------------ .local/share/containers .local/share/flatpak/repo .var/app/*/cache .wine .local/share/bottles .vagrant.d **/*.qcow2 **/*.vdi **/*.vmdk # ------------------------------------------------------------------------------ # 5. Gaming (Steam & games can be re-downloaded) # ------------------------------------------------------------------------------ .steam .local/share/Steam .lutris .paradoxinteractive # ------------------------------------------------------------------------------ # 6. Ephemeral & Lock / Socket / Temp Files # ------------------------------------------------------------------------------ **/*.tmp **/*.temp **/*.sock **/*.socket **/*~ **/.DS_Store core core.* # ------------------------------------------------------------------------------ # 7. Optional / Large User Folders (uncomment if you want to skip) # ------------------------------------------------------------------------------ Downloads/ # Videos/ # ISOs/