nixos: deploys do not kill a running backup or replica
Some checks failed
nixos / nixos (push) Failing after 1m15s
Some checks failed
nixos / nixos (push) Failing after 1m15s
The daily replica that started at 06:09:59 was stopped 41 seconds later by a deploy that changed its unit, and mailed a failure. Long one-shot jobs keep running through a switch now; the next run uses the new unit. Assisted-by: Claude:opus-5-5
This commit is contained in:
parent
6d9122eeff
commit
b8cbf0fbf5
2 changed files with 4 additions and 0 deletions
|
|
@ -54,6 +54,8 @@ in
|
||||||
wants = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
onFailure = [ "alert-mail@%n.service" ];
|
onFailure = [ "alert-mail@%n.service" ];
|
||||||
|
# A deploy that changes this unit must not kill a running replica
|
||||||
|
restartIfChanged = false;
|
||||||
path = [ pkgs.rclone ];
|
path = [ pkgs.rclone ];
|
||||||
# rclone looks for a home directory even when its remotes come from
|
# rclone looks for a home directory even when its remotes come from
|
||||||
# the environment
|
# the environment
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,8 @@ in
|
||||||
wants = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
onFailure = [ "alert-mail@%n.service" ];
|
onFailure = [ "alert-mail@%n.service" ];
|
||||||
|
# A deploy that changes this unit must not kill a running backup
|
||||||
|
restartIfChanged = false;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${script}/bin/restic-backup run";
|
ExecStart = "${script}/bin/restic-backup run";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue