borg transfer: drop part files

This commit is contained in:
Thomas Waldmann 2023-01-31 23:25:32 +01:00
parent b92f4aa487
commit d2cc167afd
No known key found for this signature in database
GPG Key ID: 243ACFA951F78E01
2 changed files with 8 additions and 1 deletions

View File

@ -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 <filename>.borg_part_<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:

View File

@ -74,7 +74,6 @@ class UpgraderFrom12To20:
"acl_access",
"acl_default",
"acl_extended",
"part",
}
if self.hlm.borg1_hardlink_master(item):