working sql dump over ssh
This commit is contained in:
parent
dda65cd17e
commit
0add03034e
|
@ -19,9 +19,9 @@ in
|
|||
};
|
||||
|
||||
systemd.services."nextcloud-backup" = {
|
||||
script = ''
|
||||
script = with pkgs; ''
|
||||
set -eu
|
||||
${pkgs.postgresql}/bin/pg_dump "nextcloud" -f /tmp/dump.sql
|
||||
${postgresql}/bin/pg_dump "nextcloud" | ${openssh}/bin/ssh -i /etc/nixos/.secrets/tulpan Glenn@nas "cat - > back/nextcloud/dump.sql"
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
|
|
Loading…
Reference in a new issue