X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fdatabases%2Fpostgresql_replication.nix;fp=modules%2Fprivate%2Fdatabases%2Fpostgresql_replication.nix;h=19ec168ede34637e2677122a50eb9521f8cc477d;hb=dded66995529a0419cc56778f4ebb4247c2ab765;hp=cc32c2be448ccad28ec97c872baa1b05c8a968e1;hpb=9f6a78629aad1d22dc8b928860fd05eb40f07352;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/databases/postgresql_replication.nix b/modules/private/databases/postgresql_replication.nix index cc32c2b..19ec168 100644 --- a/modules/private/databases/postgresql_replication.nix +++ b/modules/private/databases/postgresql_replication.nix @@ -116,7 +116,7 @@ in ${hcfg.package}/bin/pg_dumpall -h ${dataDir} -f ${backupDir}/$(${pkgs.coreutils}/bin/date -Iseconds).sql ''; u = pkgs.callPackage ./utils.nix {}; - cleanup_script = pkgs.writeScript "cleanup_postgresql_${name}" (u.keepLastNDumps backupDir 12); + cleanup_script = pkgs.writeScript "cleanup_postgresql_${name}" (u.keepLastNDumps "sql" backupDir 12); in [ "0 22,4,10,16 * * * postgres ${backup_script}" "0 3 * * * postgres ${cleanup_script}"