From d2cc167afd136d44ed9c36f36d573c45ef20b161 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 31 Jan 2023 23:25:32 +0100 Subject: [PATCH] borg transfer: drop part files --- src/borg/archiver/transfer_cmd.py | 8 ++++++++ src/borg/upgrade.py | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/borg/archiver/transfer_cmd.py b/src/borg/archiver/transfer_cmd.py index 731031622..9ec203b12 100644 --- a/src/borg/archiver/transfer_cmd.py +++ b/src/borg/archiver/transfer_cmd.py @@ -89,6 +89,14 @@ class TransferMixIn: archive = Archive(manifest, name, cache=cache, create=True) if not dry_run else None upgrader.new_archive(archive=archive) for item in other_archive.iter_items(): + is_part = bool(item.get("part", False)) + if is_part: + # borg 1.x created part files while checkpointing (in addition to the full + # file in the final archive), like .borg_part_ with item.part >= 1. + # borg2 archives do not have such special part items anymore. + # so let's remove them from old archives also, considering there is no + # code any more that deals with them in special ways (e.g. to get stats right). + continue if "chunks" in item: chunks = [] for chunk_id, size in item.chunks: diff --git a/src/borg/upgrade.py b/src/borg/upgrade.py index 3c6ef04ba..a8d17ac41 100644 --- a/src/borg/upgrade.py +++ b/src/borg/upgrade.py @@ -74,7 +74,6 @@ class UpgraderFrom12To20: "acl_access", "acl_default", "acl_extended", - "part", } if self.hlm.borg1_hardlink_master(item):