From 49233be25d6b38438981b75658a4844a9b935dc4 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 27 Jun 2016 00:25:05 +0200 Subject: [PATCH] filter out checkpoint files do not: - list them - extract them - diff them - include them for recreate --- src/borg/archive.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index 87190a054..7dbe6c97f 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -327,8 +327,12 @@ def __str__(self): def __repr__(self): return 'Archive(%r)' % self.name + def item_filter(self, item, filter=None): + return 'checkpoint' not in item and (filter(item) if filter else True) + def iter_items(self, filter=None, preload=False): - for item in self.pipeline.unpack_many(self.metadata[b'items'], filter=filter, preload=preload): + for item in self.pipeline.unpack_many(self.metadata[b'items'], preload=preload, + filter=lambda item: self.item_filter(item, filter)): yield item def add_item(self, item, show_progress=True):