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:
parent
dd5f957e6f
commit
49233be25d
1 changed files with 5 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue