Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qvm-backup-restore fails with scrypt: Input is not valid scrypt-encrypted block #4794

Closed
adrelanos opened this issue Feb 6, 2019 · 12 comments
Labels
C: core eol-4.0 Closed because Qubes 4.0 has reached end-of-life (EOL) P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@adrelanos
Copy link
Member

Qubes OS version:

R4

Affected component(s):

dom0 qvm-backup-restore


Steps to reproduce the behavior:

qvm-backup-restore --verbose --verify-only -d dom0-backup /mnt/disk/qubes-backup-...

Expected behavior:

Verification succeeds.

Actual behavior:

Verification fails.

2019-02-06 09:27:00,458 [MainProcess restore._restore_vm_data:1337] qubesadmin.backup: Getting new file: vm80/private.img.410.enc
2019-02-06 09:27:05,560 [MainProcess restore._restore_vm_data:1337] qubesadmin.backup: Getting new file: vm80/private.img.411.enc
2019-02-06 09:27:10,682 [MainProcess restore._restore_vm_data:1337] qubesadmin.backup: Getting new file: vm80/private.img.412.enc
2019-02-06 09:27:15,809 [ExtractWorker3-2 restore.__run__:717] qubesadmin.backup.extract: Finished extracting thread
qvm-backup-restore: error: failed to decrypt /var/tmp/restore33uyonmh/vm80/private.img.412.enc: b'scrypt: Input is not valid scrypt-encrypted block\n'

General notes:

I don't think this is a full disk space issue. The graphical storage indicator and also df -h both showed plenty of free diskspace.


Related issues:

@tasket
Copy link

tasket commented Feb 6, 2019

I can't reproduce this with a backup from early January that uses compression and a passphrase.

How does verify-only behave with older vs newer archives?

@andrewdavidwong andrewdavidwong added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: core labels Feb 7, 2019
@andrewdavidwong andrewdavidwong added this to the Release 4.0 updates milestone Feb 7, 2019
@andrewdavidwong
Copy link
Member

I can't reproduce this with a backup from early January that uses compression and a passphrase.

FWIW, I also have not encountered this. (I use qvm-backup-restore --verify-only [...] daily.)

@andrewdavidwong
Copy link
Member

andrewdavidwong commented Feb 8, 2019

I can't reproduce this with a backup from early January that uses compression and a passphrase.

FWIW, I also have not encountered this. (I use qvm-backup-restore --verify-only [...] daily.)

Spoke too soon! I just encountered this error during a routine backup. However, when I ran qvm-backup-restore --verify-only again a second time on the same backup file, I did not receive the error the second time.

Edit: Oh, wait. Actually, my error message was different:

qvm-backup-restore: error: failed to decrypt /var/tmp/restorexxxxx/vmxx/private.img.000.enc: b'scrypt: Decrypting file would take too much CPU time\n'

@marmarek
Copy link
Member

marmarek commented Feb 8, 2019

qvm-backup-restore: error: failed to decrypt /var/tmp/restorexxxxx/vmxx/private.img.000.enc: b'scrypt: Decrypting file would take too much CPU time\n'

In that case, it is #4683

@marmarek
Copy link
Member

marmarek commented Feb 8, 2019

I don't think this is a full disk space issue.

During the restore or just before? Number in the file name indicate it's quite big VM - do you have that much free space?

@adrelanos
Copy link
Member Author

More than 100 GB free space still at that point.

Can somehow the number of the VM vm80 be used to deduce the VM name so I can check/try again?

So I can try to verify that VM only?

It's a multi hour process the verify. Didn't even use compression in hope this speeds up things. More than 8-12 hours. And during verification most other processes are blocked. So debugging this takes too much time.

@andrewdavidwong
Copy link
Member

Can somehow the number of the VM vm80 be used to deduce the VM name so I can check/try again?

Try grepping qubes.xml.

@marmarek
Copy link
Member

Can somehow the number of the VM vm80 be used to deduce the VM name so I can check/try again?

it is QID, try qvm-ls -O name,qid.

@andrewdavidwong andrewdavidwong added the P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. label Mar 27, 2019
@adrelanos
Copy link
Member Author

New hard drive, new disk, new backup, and backup verification failing again.

[1]

qvm-backup-restore --verify-only --verbose -d dom0-backup /mnt/disk/qubes-backup-2019-05-28T074105
2019-05-28 20:20:23,951 [MainProcess restore._restore_vm_data:1337] qubesadmin.backup: Getting new file: vm74/private.img.076.enc
2019-05-28 20:20:29,032 [MainProcess restore._restore_vm_data:1337] qubesadmin.backup: Getting new file: vm74/private.img.077.enc
2019-05-28 20:20:34,120 [ExtractWorker3-2 restore.__run__:717] qubesadmin.backup.extract: Finished extracting thread
qvm-backup-restore: error: failed to decrypt /var/tmp/restoreef40j_ca/vm74/private.img.077.enc: b'scrypt: Input is not valid scrypt-encrypted block\n'
[user@dom0 ~]$ 
qvm-ls -O name,qid | grep 77
vm-name-redacted    77

[2]

qvm-backup-restore --verify-only --verbose -d dom0-backup /mnt/disk/qubes-backup-2019-05-28T074105 vm-name-redacted

So verification of that very VM that failed to verify when verifying the whole backup [1] did not fail when verifying only that very VM (which has a size of only ~ 150 MB).

My disk is 77% full. The biggest VM has a size of 50 GB but I have more than 50 GB disk space.

Are there any free disk space checks before backup verification by Qubes backup code?

How much free disk space is required for backup verification?

@marmarek
Copy link
Member

qvm-ls -O name,qid | grep 77
vm-name-redacted 77

Should be 74.

@marmarek
Copy link
Member

Are there any free disk space checks before backup verification by Qubes backup code?

Not really.

How much free disk space is required for backup verification?

In worst case scenario, as much as the whole backup. Related/duplicate: #3230, #4791

@andrewdavidwong andrewdavidwong added the eol-4.0 Closed because Qubes 4.0 has reached end-of-life (EOL) label Aug 5, 2023
@github-actions
Copy link

github-actions bot commented Aug 5, 2023

This issue is being closed because:

If anyone believes that this issue should be reopened and reassigned to an active milestone, please leave a brief comment.
(For example, if a bug still affects Qubes OS 4.1, then the comment "Affects 4.1" will suffice.)

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core eol-4.0 Closed because Qubes 4.0 has reached end-of-life (EOL) P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

4 participants