From 135edabc71eb66a6a8339e12b40708b87080e1db Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Mon, 10 Apr 2023 16:27:14 +0200 Subject: [PATCH] btrbk: rephrase warnings on unexpected (foreign) location --- btrbk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/btrbk b/btrbk index 8dbf321..eaa2349 100755 --- a/btrbk +++ b/btrbk @@ -3478,7 +3478,7 @@ sub get_receive_targets($$;@) TRACE "get_receive_targets: skip unexpected match: " . _fs_path($_) if($do_trace); push @unexpected, { src_vol => $src_vol, target_node => $_ }; if($opts{warn} && config_key($droot, "warn_unknown_targets")) { - WARN "Receive target of \"$src_vol->{PRINT}\" exists at unknown location: " . ($vinfo ? $vinfo->{PRINT} : _fs_path($_)); + WARN "Receive target of \"$src_vol->{PRINT}\" already exists at a foreign location: " . ($vinfo ? $vinfo->{PRINT} : _fs_path($_)); } next; } @@ -6807,10 +6807,10 @@ MAIN: } if(scalar @$unexpected_only && ((config_key($droot, "incremental") // "") eq "strict")) { - # If target exists at unexpected location ONLY, we can't send/receive it. - ABORTED($droot, "Receive targets of backup candidates exist at unexpected location only"); - WARN "Skipping backup of \"$sroot->{PRINT}/${snapshot_basename}.*\": " . ABORTED_TEXT($droot), - "Please check your target configuration, or fix manually by running" . ($droot->{URL_PREFIX} ? " (on $droot->{URL_PREFIX}):" : ":"), + ABORTED($droot, "Receive targets of backup candidates found at a foreign location, and option \"incremental\" is set to \"strict\""); + WARN "Skipping backups of \"$snaproot->{PRINT}/${snapshot_basename}.*\": " . ABORTED_TEXT($droot), + "It is not possible to backup (send-receive) those subvolumes without duplicating some data.", + "Please check your target setup, or fix manually by running" . ($droot->{URL_PREFIX} ? " (on $droot->{URL_PREFIX}):" : ":"), "`btrfs subvolume snapshot -r `", map { "target: $droot->{PATH}/$_->{src_vol}{NAME}, found: " . _fs_path($_->{target_node}) } @$unexpected_only; next;