From 42e2ebd2948866a21b35ed95dd9f2f8134d7aab5 Mon Sep 17 00:00:00 2001 From: Zuckerberg Date: Sun, 9 Apr 2023 12:35:20 -0600 Subject: [PATCH] Allow marking folders as omitted from backup --- common/backups.nix | 4 ++++ common/server/samba.nix | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common/backups.nix b/common/backups.nix index 90bae20..b56f0bd 100644 --- a/common/backups.nix +++ b/common/backups.nix @@ -15,6 +15,10 @@ let RandomizedDelaySec = "1h"; }; + extraBackupArgs = [ + ''--exclude-if-present ".nobackup"'' + ]; + pruneOpts = [ "--keep-daily 7" # one backup for each of the last n days "--keep-weekly 5" # one backup for each of the last n weeks diff --git a/common/server/samba.nix b/common/server/samba.nix index 8f8c011..344235b 100644 --- a/common/server/samba.nix +++ b/common/server/samba.nix @@ -25,9 +25,7 @@ printing = cups printcap name = cups - # horrible files - veto files = /._*/.DS_Store/ /._*/._.DS_Store/ - delete veto files = yes + hide files = /.nobackup/.DS_Store/._.DS_Store/ ''; shares = { @@ -81,7 +79,7 @@ backup.group."samba".paths = [ config.services.samba.shares.googlebot.path config.services.samba.shares.cris.path - "${config.services.samba.shares.public.path}/Regularly_Backed_Up" + config.services.samba.shares.public.path ]; # Windows discovery of samba server