aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-09-07 08:53:20 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-09-07 08:53:20 +0200
commit0aa7e23c659590b0960eade3419c0991b0a8b500 (patch)
tree032e5505377578bb952725b20aed2d7d0e438707 /modules
parent5b42284e2039d8550ab3c38ab3abcfdaa096e238 (diff)
downloadNix-0aa7e23c659590b0960eade3419c0991b0a8b500.tar.gz
Nix-0aa7e23c659590b0960eade3419c0991b0a8b500.tar.zst
Nix-0aa7e23c659590b0960eade3419c0991b0a8b500.zip
Reduce number of postgresql backups
Diffstat (limited to 'modules')
-rw-r--r--modules/private/databases/postgresql_replication.nix2
1 files changed, 1 insertions, 1 deletions
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
119 ${hcfg.package}/bin/pg_dumpall -h ${dataDir} -f ${backupDir}/$(${pkgs.coreutils}/bin/date -Iminutes).sql 119 ${hcfg.package}/bin/pg_dumpall -h ${dataDir} -f ${backupDir}/$(${pkgs.coreutils}/bin/date -Iminutes).sql
120 ''; 120 '';
121 u = pkgs.callPackage ./utils.nix {}; 121 u = pkgs.callPackage ./utils.nix {};
122 cleanup_script = pkgs.writeScript "cleanup_postgresql_${name}" (u.keepLastNDumps "sql" backupDir 12); 122 cleanup_script = pkgs.writeScript "cleanup_postgresql_${name}" (u.keepLastNDumps "sql" backupDir 6);
123 in [ 123 in [
124 "0 22,4,10,16 * * * postgres ${backup_script}" 124 "0 22,4,10,16 * * * postgres ${backup_script}"
125 "0 3 * * * postgres ${cleanup_script}" 125 "0 3 * * * postgres ${cleanup_script}"