db dump in a path that restics backsup

This commit is contained in:
admin 2024-09-13 22:14:55 +02:00
parent 67cec24136
commit 397b115a98

View file

@ -34,11 +34,11 @@ in {
script = with pkgs; '' script = with pkgs; ''
set -eu set -eu
date=$(date --iso-8601) date=$(date --iso-8601)
${postgresql}/bin/pg_dump "nextcloud" | ${openssh}/bin/ssh -i /etc/nixos/.secrets/tulpan Glenn@nas "cat - > back/nextcloud/sqldump/$date.sql" ${postgresql}/bin/pg_dump "nextcloud" > /pool/var/lib/nextcloud/pgdump/latest.sql
''; '';
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
User = "postgres"; User = "nextcloud";
}; };
}; };