]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Reduce number of postgresql backups
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 7 Sep 2020 06:53:20 +0000 (08:53 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 7 Sep 2020 06:53:20 +0000 (08:53 +0200)
modules/private/databases/postgresql_replication.nix

index 6ac2455a9eea3632c783de3a8fc937aedbe57087..b103b8c0e965d10b6d26201cf0fd662f2799adf7 100644 (file)
@@ -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}"