Improve pg_backup
This commit is contained in:
parent
656e7a08fc
commit
f9e801f09f
2 changed files with 2 additions and 4 deletions
|
@ -96,8 +96,7 @@ let
|
||||||
pg_backup = {
|
pg_backup = {
|
||||||
script = let name = "nextcloud-psql-${hostname}";
|
script = let name = "nextcloud-psql-${hostname}";
|
||||||
in ''
|
in ''
|
||||||
${pkgs.postgresql}/bin/pg_dump nextcloud > /var/lib/db-backup-dumps/tmp/${name}
|
${pkgs.postgresql}/bin/pg_dump nextcloud > /var/lib/db-backup-dumps/cur/${name}
|
||||||
${pkgs.coreutils}/bin/mv /var/lib/db-backup-dumps/tmp/${name} /var/lib/db-backup-dumps/cur/${name}
|
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "nextcloud";
|
User = "nextcloud";
|
||||||
|
|
|
@ -39,8 +39,7 @@ in {
|
||||||
systemd.services."pg_backup" = {
|
systemd.services."pg_backup" = {
|
||||||
script = let name = "matrix-synapse";
|
script = let name = "matrix-synapse";
|
||||||
in ''
|
in ''
|
||||||
${pkgs.postgresql}/bin/pg_dump matrix-synapse > /var/lib/db-backup-dumps/tmp/${name}
|
${pkgs.postgresql}/bin/pg_dump matrix-synapse > /var/lib/db-backup-dumps/cur/${name}
|
||||||
${pkgs.coreutils}/bin/mv /var/lib/db-backup-dumps/tmp/${name} /var/lib/db-backup-dumps/cur/${name}
|
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "matrix-synapse";
|
User = "matrix-synapse";
|
||||||
|
|
Loading…
Reference in a new issue