aboutsummaryrefslogtreecommitdiff
path: root/modules/private/databases/postgresql_replication.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-07 08:05:53 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-07 08:05:53 +0100
commitdded66995529a0419cc56778f4ebb4247c2ab765 (patch)
treed355e6adda5b833c50c473062fb51f078918878c /modules/private/databases/postgresql_replication.nix
parent9f6a78629aad1d22dc8b928860fd05eb40f07352 (diff)
downloadNix-dded66995529a0419cc56778f4ebb4247c2ab765.tar.gz
Nix-dded66995529a0419cc56778f4ebb4247c2ab765.tar.zst
Nix-dded66995529a0419cc56778f4ebb4247c2ab765.zip
Add replication for redis
Diffstat (limited to 'modules/private/databases/postgresql_replication.nix')
-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 cc32c2b..19ec168 100644
--- a/modules/private/databases/postgresql_replication.nix
+++ b/modules/private/databases/postgresql_replication.nix
@@ -116,7 +116,7 @@ in
116 ${hcfg.package}/bin/pg_dumpall -h ${dataDir} -f ${backupDir}/$(${pkgs.coreutils}/bin/date -Iseconds).sql 116 ${hcfg.package}/bin/pg_dumpall -h ${dataDir} -f ${backupDir}/$(${pkgs.coreutils}/bin/date -Iseconds).sql
117 ''; 117 '';
118 u = pkgs.callPackage ./utils.nix {}; 118 u = pkgs.callPackage ./utils.nix {};
119 cleanup_script = pkgs.writeScript "cleanup_postgresql_${name}" (u.keepLastNDumps backupDir 12); 119 cleanup_script = pkgs.writeScript "cleanup_postgresql_${name}" (u.keepLastNDumps "sql" backupDir 12);
120 in [ 120 in [
121 "0 22,4,10,16 * * * postgres ${backup_script}" 121 "0 22,4,10,16 * * * postgres ${backup_script}"
122 "0 3 * * * postgres ${cleanup_script}" 122 "0 3 * * * postgres ${cleanup_script}"