${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}"