Re: [qubes-users] how to better verify backups to catch restore errors?

2017-06-22 Thread Andrew David Wong
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 2017-06-22 12:11, cubit wrote:
> 22. Jun 2017 03:58 by a...@qubes-os.org:
> 
>> You can use the "verify-only" restore option (available both in 
>> Qubes Manager and on the command-line) immediately after creating
>> a backup.
>> 
> That is the problem.   I have done the verify and it passes with
> no error for all of the backup archives that have problems
> restoring my "storage" AppVM.  As I discovered this has been a
> problem for nearly 4 months worth of backups.
> 
> I am trying to find if there is another way to verify backups
> because the built in method and restorting is failing me at the
> moment.  Or better fix the backup/restore issue
> 

Ok. In that case, it sounds like you're experiencing this rare but
serious bug:

https://github.com/QubesOS/qubes-issues/issues/1577

Just to check: Have you (per my comment on that issue) tried
rebooting, then trying again to verify/restore a backup that should be
working?

- -- 
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-BEGIN PGP SIGNATURE-

iQIcBAEBCgAGBQJZTH35AAoJENtN07w5UDAwmUwP+wbBEm9M6L0hjPmmIbm5/dKd
BlqjH2In+wsnYPRhC6CxbI6ILjYPOFzWclVxt2MlvZdILte/h7iHps8YbPiAELGA
l869ubBbBTrlT8bMzIRR2XTKim+1bZWRCtnBgMwhSxGkDxCcdZqc4klO0hy0br4D
6vSsBbIYF+ZLrpkvEvBVSZJALxFACiv8gAvgQ4SdgW3ermPg2J9+wsAQ7bEw2wj4
jXjx47l0rHmqtQ53mM76S1vJ+kt7CB0QffBY7KJh0Iz9ELbyrhH+V3kjt+aAF3/I
nNLVpHu0mAwmlpSbObfa/3NJghw2oOW6b0BeE90bGfLIbARL6XEMzcxvINZUz1rs
b74n/A96nhqaqqwS9yzbkPYgdaUkZfruWROsAz4oQeHInrdMxdH6Cdn0j2/1flp+
ILTgSzuAoQh+lZdc0bJ6wl2OEDVNUrc65Tjy2PukhV1mqnze2d9pGJ7DgdMWiRFe
zOZunetX2umt4KDHbLM5gbnvVHitUZCnFp4FBJmKKt7JN30Ogs0evyVLCabop009
0a/BAFSTxfoU5O3yzUbC4vaaDJNlIy440qegUbd480ZhdJBgXdtDFdExX9TZreOS
65Ml4oKIwkgKFCPhHwFarRigIurXJNBQqtzlyxUnsNOO32RuHLh/U3DIcV70cnp2
Kl3HGEgguNASpPxx0OI4
=C1LD
-END PGP SIGNATURE-

-- 
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 post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/bb1da7ff-042e-c770-c622-34d323dc19b5%40qubes-os.org.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] how to better verify backups to catch restore errors?

2017-06-22 Thread cubit
22. Jun 2017 03:58 by a...@qubes-os.org:

> You can use the "verify-only" restore option (available both in Qubes
> Manager and on the command-line) immediately after creating a backup.
>




That is the problem.   I have done the verify and it passes with no error for 
all of the backup archives that have problems restoring my "storage" AppVM.  As 
I discovered this has been a problem for nearly 4 months worth of backups.





I am trying to find if there is another way to verify backups because the built 
in method and restorting is failing me at the moment.  Or better fix the 
backup/restore issue

-- 
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 post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/KnFmLnO--3-0%40tutanota.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] how to better verify backups to catch restore errors?

2017-06-21 Thread Andrew David Wong
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 2017-06-21 15:47, cubit wrote:
> Is there a better way to verify that the qubes based backup
> succeeds?
> 
> I discovered today that, while I backup all AppVM and TemplateVM in
> one time (via GUI),  the backups created going back to February all
> consistently fail to restore one particular appVM
> 
> Yesterday I needed a clean laptop for a travel so I did a full
> backup and then removed my "storage" AppVM that contain all my
> documents as well I delete 2 other AppVM, "gpg" and "chat".   Can
> you see where this go..?
> 
> Today I go to restore the deleted AppVM via GUI.   "gpg" and "chat"
> restore perfect but "storage" gives error even though when I
> veryify the archive it is ok :((
> 
> ERROR: [Errno 2] No such file or directory:
> u'/var/tmp/restore_LtT4Jk/vm1' *** Skipping VM: storage -> Done.
> Please install updates for all the restored templates. -> Completed
> with errors!
> 
> 
> I try using "qvm-backup-restore -d sys-usb
> /path/to/backup/qubes_backup_time storage --debug" to see if there
> are more details.  It fails too and no much details are extra  See
> attached restore_errors.txt where it try vm17
> 
> 
> What is interesting is that for some reason it is trying to restore
> vm17 which is not my "storage" vm based on the qubes.xml in the
> same directory.  My "storage" vm should be 1.
> 
> I was able to do "emergency backup recovery" on files in vm1
> directory and as hoped, all my "storage" appVM files were in
> there.
> 
> I had to go to backups from February before I could find one that
> would restore "storage" appVM from GUI or qvm-backup-restore
> 
> Some questions
> 
> - how can I better veryify backups working?

You can use the "verify-only" restore option (available both in Qubes
Manager and on the command-line) immediately after creating a backup.

- -- 
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-BEGIN PGP SIGNATURE-

iQIcBAEBCgAGBQJZS0BjAAoJENtN07w5UDAwKnQQALo2uYmdbW6zcBTmYEYC2QuV
W+zgp+pT0S/SXK7qqG5Qw5o3N2y104eK95DvKK0ZyBC/UIbnsYO4u77oECC1CTsx
r+kpkr7cslNMsnkleUPk6ahwutZZg/eJ6E57w2kPGcDJdBh8ys2i8ubHGM2hft85
9jOAcbjUP5X9COVO4TtCK3JF67R9VpmemXSgNE8BlVFsmaqdncgSO/RfjTx/+Oov
QuborHaz4GRFrw6ObAoRlObsrF+QHqMj+zQVmUUXD+6IT+SRSUi/J6NX0WHJbxgf
Vzp1cfZEDgdHGEY718yyiwDxhYk6BofQQ5on0E8ogJfucdWQgCBrW3uxnvfovxcM
Z41Khz4vtHtEpOiWApNAYT2XxFQRGZ/1XArIE7UbU7T0f9d9mPf31SxyYr9aHUER
l0izY7UZ0bIjRjr1vAVDgSNep9drO25wWQ/ia/5M0NHIy+xknRyA00OF9q2Cf2r0
uZdlJHuFi9htyI6Wd925ajP07LOfPxR8RMlS5+SLHkYF90pQkg4XdSo0wf3XBopc
gO0+ijEqYOzZtyoaUARwbpxV7tLOPsa/AvJgJthphB6UgtMDUoio42FYMUbRmqXt
VLK0L/7Xj8fvQzFHRig6xMOYFvLjEml+zR6dYzNQK2S2uklZdqFJkT6I4fWoEDZB
4A594AjYXaLPsaBgDmSw
=gDtA
-END PGP SIGNATURE-

-- 
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 post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/245f04eb-e855-d5b0-ec3b-925e302241d2%40qubes-os.org.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] how to better verify backups to catch restore errors?

2017-06-21 Thread cubit
Is there a better way to verify that the qubes based backup succeeds?

I discovered today that, while I backup all AppVM and TemplateVM in one time 
(via GUI),  the backups created going back to February all consistently fail to 
restore one particular appVM

Yesterday I needed a clean laptop for a travel so I did a full backup and then 
removed my "storage" AppVM that contain all my documents as well I delete 2 
other AppVM, "gpg" and "chat".   Can you see where this go..?

Today I go to restore the deleted AppVM via GUI.   "gpg" and "chat" restore 
perfect but "storage" gives error even though when I veryify the archive it is 
ok :((

   ERROR: [Errno 2] No such file or directory: u'/var/tmp/restore_LtT4Jk/vm1'
   *** Skipping VM: storage
   -> Done. Please install updates for all the restored templates.
   -> Completed with errors!
   

 I try using "qvm-backup-restore -d sys-usb /path/to/backup/qubes_backup_time 
storage --debug" to see if there are more details.  It fails too and no much 
details are extra  See attached restore_errors.txt where it try vm17
 
 
What is interesting is that for some reason it is trying to restore vm17 which 
is not my "storage" vm based on the qubes.xml in the same directory.  My 
"storage" vm should be 1.

I was able to do "emergency backup recovery" on files in vm1 directory and as 
hoped, all my "storage" appVM files were in there.

I had to go to backups from February before I could find one that would restore 
"storage" appVM from GUI or qvm-backup-restore

Some questions

- how can I better veryify backups working?
- why does it seem qubes is getting confused about appVM qid on restore?
- at top of restore_error.txt file it says only 1MB to restore, even when AppVM 
is 1.8GB is size,  why size difference?
- is there anything I can do to compare the good backup that restores via gui 
and any of the many broken backups to see what went wrong?
- how can I be sure this qid mixup won't happen again?


-- 
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 post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/KnBPDPp--3-0%40tutanota.com.
For more options, visit https://groups.google.com/d/optout.
Working in temporary dir:/var/tmp/restore_LtT4Jk
Extracting data: 1.0 MiB to restore
Run command[u'/usr/libexec/qubes/qfile-dom0-unpacker', '1000', 
u'/var/tmp/restore_LtT4Jk', u'-v']
Got backup header and hmac: backup-header, backup-header.hmac
Verifying file /var/tmp/restore_LtT4Jk/backup-header
Loading hmac for file /var/tmp/restore_LtT4Jk/backup-header
File verification OK -> Sending file /var/tmp/restore_LtT4Jk/backup-header
Creating pipe in: /var/tmp/restore_LtT4Jk/restore_pipe
Getting new file:qubes.xml.000
Getting hmac:qubes.xml.000.hmac
Verifying file /var/tmp/restore_LtT4Jk/qubes.xml.000
Started sending thread
Moving to dir /var/tmp/restore_LtT4Jk
Loading hmac for file /var/tmp/restore_LtT4Jk/qubes.xml.000
File verification OK -> Sending file /var/tmp/restore_LtT4Jk/qubes.xml.000
Getting new file:
Waiting for the extraction process to finish...
Extracting file /var/tmp/restore_LtT4Jk/qubes.xml.000
Running command [u'tar', u'-xkv', u'qubes.xml']
Removing file /var/tmp/restore_LtT4Jk/qubes.xml.000
qubes.xml
Finished extracting thread
Extraction process finished with code:0
Loading file /var/tmp/restore_LtT4Jk/qubes.xml
storage is included in backup
whonix-gw is included in backup
whonix-ws is included in backup
sys-net is included in backup
sys-firewall is included in backup
debian-8-live is included in backup
sys-whonix is included in backup
anon-whonix is included in backup
5 is included in backup
debian-8-sec is included in backup
debian-8-stable-java is included in backup
4 is included in backup
net- is included in backup
1 is included in backup
2 is included in backup
3 is included in backup
chat is included in backup
gpg is included in backup
personal is included in backup
6 is included in backup
7 is included in backup
8 is included in backup
9 is included in backup
fedora-24-live is included in backup
10 is included in backup

The following VMs are included in the backup:

--+--+--+---+---+---+
 name | type | template | updbl | netvm | label |
--+--+--+---+---+---+
 storage |  App | debian-8-live |   | - | green | <-- Will be renamed 
to 'storage'

The above VMs will be copied and added to your system.
Exisiting VMs will NOT be removed.
Do you want to proceed? [y/N] Working in temporary dir:/var/tmp/restore_LtT4Jk
Extracting data: 1.7 GiB to restore
Run command[u'/usr/libexec/qubes/qfile-dom0-unpacker', '1000',