backup/restore: make backup header extraction faster

Abort tar process after extracting requested files - do not parse the
archive until the end (possibly tens of GB later).

Fixes QubesOS/qubes-issues#2986
This commit is contained in:
Marek Marczykowski-Górecki 2017-08-30 15:51:44 +02:00
parent e64bd839a5
commit 6568d624cc
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -869,6 +869,7 @@ class BackupRestore(object):
tar1_command = ['tar',
'-ixv',
'--occurrence=1',
'-C', self.tmpdir] + filelist
tar1_env = os.environ.copy()