Skip to content

Commit

Permalink
chore(backup): add some ignore paths
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenhoenle committed Nov 8, 2024
1 parent c08c67a commit 5a275e3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ systemctl status restic-backups-fullbackup
# view snapshots
restic-fullbackup snapshots

# browse snapshots
restic-fullbackup ls latest /var/lib/

# restore
/run/current-system/sw/bin/restic-fullbackup restore --target / latest
```
Expand Down
22 changes: 22 additions & 0 deletions services/backup.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ let
cfg.paperless.backupPrepareCommandExport
]
));

excludeFile = pkgs.writeText "restic-excludes.txt"
''
/home/ruben/.bash_history
/home/ruben/.bash_profile
/home/ruben/.bashrc
/home/ruben/.cache
/home/ruben/.config
/home/ruben/.docker
/home/ruben/.gnupg
/home/ruben/.local
/home/ruben/.nix-defexpr
/home/ruben/.nix-profile
/home/ruben/.pki
/home/ruben/.profile
/home/ruben/.vim
/home/ruben/.viminfo
/home/ruben/.zshenv
/home/ruben/.zsh_history
/home/ruben/.zshrc
'';
in
{
options.ruben.fullbackup.enable = lib.mkEnableOption "full backup";
Expand Down Expand Up @@ -38,6 +59,7 @@ in
"--keep-yearly 3"
];
extraOptions = [ "s3.region=eu-central-003" ];
extraBackupArgs = [ "--exclude-caches" "--exclude-file=${excludeFile}" ];
timerConfig = {
OnCalendar = "hourly";
Persistent = true;
Expand Down

0 comments on commit 5a275e3

Please sign in to comment.