1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 09:19:31 +00:00

filter out checkpoint files

do not:
- list them
- extract them
- diff them
- include them for recreate
This commit is contained in:
Thomas Waldmann 2016-06-27 00:25:05 +02:00
parent dd5f957e6f
commit 49233be25d

View file

@ -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):