From 1f91a58f81275b58105f4d1f72299657f948502e Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Fri, 23 Feb 2024 19:12:30 +0100 Subject: [PATCH] yodaHedgehog: sync after daily backup --- hosts/yodaHedgehog/host-specific.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hosts/yodaHedgehog/host-specific.nix b/hosts/yodaHedgehog/host-specific.nix index 376fe20..9d3b517 100644 --- a/hosts/yodaHedgehog/host-specific.nix +++ b/hosts/yodaHedgehog/host-specific.nix @@ -42,7 +42,7 @@ in path = with pkgs; [ # Provides `ssh` openssh - # Provides `readlink` (with support for parameter `-e`, required by `btrbk`) + # Provides `sync`, `readlink` (with support for parameter `-e`, required by `btrbk`) coreutils # Provides `awk`, `grep`, `sleep`, `printf`, `echo`, 'sendmail', `readlink` (without support for parameter `-e`) busybox @@ -126,6 +126,8 @@ in sleep 15s #printf '%s\n' 'Finished backup script.' + # Sync changed files to disk to reduce risk of file corruption in case of power loss. + sync # Suspend to save power. systemctl suspend '';