From 28a25b354b2b741d0fea28ba11c26ed5427f3d72 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 29 Oct 2017 14:49:42 +0100 Subject: [PATCH] recreate: move chunks_healthy when excluding hardlink master, fixes #3228 (cherry picked from commit 7aafcc517a30627d5b76180cc0cc604c7b04cb34) --- src/borg/archive.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index e0f6ddb3b..78a7f07d0 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -1639,15 +1639,17 @@ def item_is_hardlink_master(item): if not matcher.match(item.path): self.print_file_status('x', item.path) if item_is_hardlink_master(item): - hardlink_masters[item.path] = (item.get('chunks'), None) + hardlink_masters[item.path] = (item.get('chunks'), item.get('chunks_healthy'), None) continue if target_is_subset and hardlinkable(item.mode) and item.get('source') in hardlink_masters: # master of this hard link is outside the target subset - chunks, new_source = hardlink_masters[item.source] + chunks, chunks_healthy, new_source = hardlink_masters[item.source] if new_source is None: # First item to use this master, move the chunks item.chunks = chunks - hardlink_masters[item.source] = (None, item.path) + if chunks_healthy is not None: + item.chunks_healthy = chunks_healthy + hardlink_masters[item.source] = (None, None, item.path) del item.source else: # Master was already moved, only update this item's source