chore(restic): extend ignore patterns

This commit is contained in:
Felix Schröter 2022-08-15 21:05:58 +02:00
parent b9c61b9182
commit 76d4457e92
Signed by: felschr
GPG key ID: 671E39E6744C807D
2 changed files with 57 additions and 2 deletions

View file

@ -15,6 +15,7 @@ in {
services.restic.backups.full = resticLib.resticConfig {
name = "home-pc";
paths = [ "/etc/nixos" "/var/lib" "/home" ];
# inspiration: https://github.com/rubo77/rsync-homedir-excludes
ignorePatterns = [
"/var/lib/systemd"
"/var/lib/libvirt"
@ -24,26 +25,69 @@ in {
"/var/lib/docker"
"/var/lib/flatpak"
"/home/*/Downloads"
"/home/*/Pictures"
"/home/*/Videos"
"/home/*/Music"
"/home/*/Games"
"/home/*/.android"
"/home/*/.AndroidStudio*"
"/home/*/.cache"
"/home/*/.cargo"
"/home/*/.compose-cache"
"/home/*/.dotnet"
"/home/*/.gradle"
"/home/*/.mozilla"
"/home/*/.npm"
"/home/*/.nuget"
"/home/*/.rustup"
"/home/*/.steam"
"/home/*/.templateengine"
"/home/*/.var"
"/home/*/.local/share/Trash"
"/home/*/.local/share/libvirt"
"/home/*/.wine"
"/home/*/.local/share/containers"
"/home/*/.local/share/docker"
"/home/*/.local/share/flatpak"
"/home/*/.local/share/bottles"
"/home/*/.local/share/Steam"
"/home/*/.local/share/keybase"
"/home/*/.local/share/libvirt"
"/home/*/.local/share/lutris"
"/home/*/.local/share/NuGet"
"/home/*/.local/share/tor-browser"
"/home/*/.local/share/Trash"
"/home/*/.config/BraveSoftware"
"/home/*/.config/chromium"
"/home/*/.config/gatsby"
"/home/*/.config/libvirt"
"/home/*/.config/spotify/Users"
"/home/felschr/media"
"/home/felschr/keybase"
"/home/felschr/dev" # backup ~/dev-backup instead
# general
".cache"
"cache"
".tmp"
".temp"
"tmp"
"temp"
".log"
"log"
".Trash"
# electron apps
"/home/*/.config/**/blob_storage"
"/home/*/.config/**/Application Cache"
"/home/*/.config/**/Cache"
"/home/*/.config/**/CachedData"
"/home/*/.config/**/Code Cache"
"/home/*/.config/**/GPUCache"
"/home/*/.var/app/**/blob_storage"
"/home/*/.var/app/**/Application Cache"
"/home/*/.var/app/**/Cache"
"/home/*/.var/app/**/CachedData"
"/home/*/.var/app/**/Code Cache"
"/home/*/.var/app/**/GPUCache"
];
timerConfig.OnCalendar = "0/4:00:00";
extraPruneOpts = [ "--keep-last 6" ];

View file

@ -27,6 +27,17 @@ in {
"/home/*/.local/share/containers"
"/home/*/.local/share/Trash"
"/var/lib/jellyfin/transcodes"
# general
".cache"
"cache"
".tmp"
".temp"
"tmp"
"temp"
".log"
"log"
".Trash"
];
timerConfig.OnCalendar = "0/4:00:00";
extraPruneOpts = [ "--keep-last 6" ];