On Saturday, September 7, 2019 at 10:54:34 PM UTC+2, Heinrich Ulbricht 
wrote:
>
>
>> Can anybody suggest a modification (or hack, however dirty - it's meant 
>> to be temporary) to restore.py so it won't need 700 GB of additional 
>> temporary storage when I try to restore my 700 GB AppVM?
>>
>>
> The best bet I currently have it applying the "sleep trick" (see here 
> <https://github.com/QubesOS/qubes-issues/issues/3230#issuecomment-340253679>) 
> to line 598ff 
> <https://github.com/QubesOS/qubes-core-admin-client/blob/master/qubesadmin/backup/restore.py#L598>
>  
> in *restore.py*.
>
> So this:
> elif inner_name in self.handlers:
> tar2_cmdline = ['tar',
> '-%svvO' % ("t" if self.verify_only else "x"),
> inner_name]
> redirect_stdout = subprocess.PIPE
>
> Would become something like this:
> elif inner_name in self.handlers:
> tar2_cmdline = ['tar',
> '-%svvO' % ("t" if self.verify_only else "x"),
> '--checkpoint=20000',
> '--checkpoint-action=exec=\'sleep "$(stat -f --format="(((%b-%a)/%b)^5)*30" 
> /var/tmp | bc -l)"\'',
> inner_name]
> redirect_stdout = subprocess.PIPE
>
>
> Too naive?
>


Quick update on how it is going: I' got the restore operation in an 
equilibrium now.

THIS is the place to insert the checkpoint operation for the un-tar (line 
913ff in restore.py 
<https://github.com/QubesOS/qubes-core-admin-client/blob/9158412a24da300e4c54346ccb54fce1e748500f/qubesadmin/backup/restore.py#L913>
):

tar1_command = ['tar',
'-ixv',
'--occurrence=1',
'--checkpoint=20000',
'--checkpoint-action=exec=\'sleep "$(stat -f --format="(((%b-%a)/%b)^5)*30" 
/var/tmp | bc -l)"\'',
'-C', self.tmpdir] + filelist

This seems to be a non-interruptable tar operation that is pushing 
thousands of chunk files into the temp location with the other processes 
having no chance to process them in time. I'll follow up with details.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/7c409720-bed9-4198-823a-d1f081d91ed2%40googlegroups.com.

Reply via email to