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:
		
							parent
							
								
									e64bd839a5
								
							
						
					
					
						commit
						6568d624cc
					
				| @ -869,6 +869,7 @@ class BackupRestore(object): | |||||||
| 
 | 
 | ||||||
|             tar1_command = ['tar', |             tar1_command = ['tar', | ||||||
|                             '-ixv', |                             '-ixv', | ||||||
|  |                             '--occurrence=1', | ||||||
|                             '-C', self.tmpdir] + filelist |                             '-C', self.tmpdir] + filelist | ||||||
| 
 | 
 | ||||||
|         tar1_env = os.environ.copy() |         tar1_env = os.environ.copy() | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Marek Marczykowski-Górecki
						Marek Marczykowski-Górecki