diff --git a/nextcloud.nix b/nextcloud.nix index c9ec935..176d325 100644 --- a/nextcloud.nix +++ b/nextcloud.nix @@ -21,7 +21,8 @@ in systemd.services."nextcloud-db-backup" = { script = with pkgs; '' set -eu - ${postgresql}/bin/pg_dump "nextcloud" | ${openssh}/bin/ssh -i /etc/nixos/.secrets/tulpan Glenn@nas "cat - > back/nextcloud/latest.sql" + 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" ''; serviceConfig = { Type = "oneshot";