>
>
>
> 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))*120" 
> /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.
>


Above sole change to restore.py did solve the problem for me. Note that I 
tweaked the parameters a bit to give it more time. With this change the 
initial sleep duration was about 2 seconds. The temp directory slowly 
filled up and the sleep duration increased to about 11 seconds and stayed 
there, keeping everything in balance. Looking at the task manager I saw the 
checkpoint was hit about every 5 seconds. That's an 11 second sleep every 5 
seconds.

To summarize this is what I did to restore:
* copy the 700 GB backup file to a new temporary AppVM in storage pool *1 *(I 
had to free some space there...) [HDD]
* mount the private storage of this new AppVM to dom0
* modify *restore.py* as described above (added checkpoint, left */var/temp* 
unchanged as temporary location which is on a SSD)
* set the default storage pool to storage pool *2 *[HDD]
* used the "Restore Backup" UI to select the backup file
* start the restore operation and wait until it successfully finished

There were other proposed solutions I did not try:
* dd the old HDD content to a new HDD, make the new Qubes installation 
recognize it
* LVM mirroring
* use Chris' pre-release script
* slow down qfile-dom0-unpacker (<- this solution came in as slowing down 
the tar process was already working)
* attach USB drive to dom0 and restore from there (<- I choose to not 
attach a USB drive)

I would've tried those next had the restore operation with modified 
*restore.py* failed. In my view the out-of-the-box solution has the lowest 
security and maintenance risks.

Thank you to all who helped me getting this done! And good to hear there is 
currently work being done to make this smoother in the future (by Chris & 
Marek - should you synchronize?).

Note: While fiddling around I discovered that the restore operation cannot 
be canceled: https://github.com/QubesOS/qubes-issues/issues/5304

-- 
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/0a61520e-24a7-4dfa-84c0-135873103b5a%40googlegroups.com.

Reply via email to