From 6568d624cc402a4f412efa84398447614c9eaf35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 30 Aug 2017 15:51:44 +0200 Subject: [PATCH] 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 --- qubesadmin/backup/restore.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qubesadmin/backup/restore.py b/qubesadmin/backup/restore.py index 981282a..0df5df1 100644 --- a/qubesadmin/backup/restore.py +++ b/qubesadmin/backup/restore.py @@ -869,6 +869,7 @@ class BackupRestore(object): tar1_command = ['tar', '-ixv', + '--occurrence=1', '-C', self.tmpdir] + filelist tar1_env = os.environ.copy()