From 12ed26d1352c9b9278bb858c4e2b44021c5d8c70 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Tue, 16 May 2023 20:26:59 +0200 Subject: Continue execution if a sync target fails lifeboat runs with 'set -e', meaning it stops executing whenever a command invoked by it fails. This means that the entire script stops if rclone fails - potentially ignoring future sync targets. Make sure we catch any failure on rclone's side so the script can continue. --- lifeboat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lifeboat') diff --git a/lifeboat b/lifeboat index 2d88f9d..bb8284b 100755 --- a/lifeboat +++ b/lifeboat @@ -73,7 +73,7 @@ sync_default() { continue fi - rclone sync --transfers 20 --fast-list "$RESTIC_REPOSITORY" "$target/$LIFEBOAT_REPO_NAME" + rclone sync --transfers 20 --fast-list "$RESTIC_REPOSITORY" "$target/$LIFEBOAT_REPO_NAME" || err "skipping upload to $target" done < config/sync } -- cgit v1.2.3-2-gb3c3