about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-08-02 10:18:13 +0900
committersefidel <contact@sefidel.net>2023-08-02 10:33:03 +0900
commit472deaafed26610f15d8b46fdb6470a765ca6f93 (patch)
tree0429f50995de904b0cea9caa328b684b375e2ab4
parent718a92694e822106c66bba8a106f042e1ffa6afe (diff)
downloadinfra-472deaafed26610f15d8b46fdb6470a765ca6f93.tar.gz
infra-472deaafed26610f15d8b46fdb6470a765ca6f93.zip
feat(services/backup): use static backup for pgsql
-rw-r--r--modules/services/backup.nix2
-rw-r--r--systems/cobalt/default.nix3
2 files changed, 4 insertions, 1 deletions
diff --git a/modules/services/backup.nix b/modules/services/backup.nix
index 41d2329..9770b43 100644
--- a/modules/services/backup.nix
+++ b/modules/services/backup.nix
@@ -74,7 +74,7 @@ in
       # use borg 1.0+ on rsync.net
       extraCreateArgs = "--verbose --stats --checkpoint-interval 600";
       compression = "auto,zstd";
-      startAt = "daily";
+      startAt = "*-*-* 03:00:00"; # pgsql backup runs on 01:15:00
       persistentTimer = true;
     };
   };
diff --git a/systems/cobalt/default.nix b/systems/cobalt/default.nix
index fa1cd8b..fabc687 100644
--- a/systems/cobalt/default.nix
+++ b/systems/cobalt/default.nix
@@ -182,6 +182,9 @@ in
       exclude = [
         # Rust build files
         "/home/**/target"
+
+        # Static backup created in /persist/var/backup/postgresql
+        "/persist/var/lib/postgresql"
       ];
 
       repo = "20963@hk-s020.rsync.net:rolling/exotic/cobalt";