keep multiple dates of sql dumps
This commit is contained in:
parent
e7c4000fbf
commit
4de4db324e
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue