From 0aa7e23c659590b0960eade3419c0991b0a8b500 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 7 Sep 2020 08:53:20 +0200 Subject: [PATCH] Reduce number of postgresql backups --- modules/private/databases/postgresql_replication.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/private/databases/postgresql_replication.nix b/modules/private/databases/postgresql_replication.nix index 6ac2455..b103b8c 100644 --- a/modules/private/databases/postgresql_replication.nix +++ b/modules/private/databases/postgresql_replication.nix @@ -119,7 +119,7 @@ in ${hcfg.package}/bin/pg_dumpall -h ${dataDir} -f ${backupDir}/$(${pkgs.coreutils}/bin/date -Iminutes).sql ''; u = pkgs.callPackage ./utils.nix {}; - cleanup_script = pkgs.writeScript "cleanup_postgresql_${name}" (u.keepLastNDumps "sql" backupDir 12); + cleanup_script = pkgs.writeScript "cleanup_postgresql_${name}" (u.keepLastNDumps "sql" backupDir 6); in [ "0 22,4,10,16 * * * postgres ${backup_script}" "0 3 * * * postgres ${cleanup_script}" -- 2.41.0