backup format v4: add backup_id field

Protect against feeding the user with the same VM but from older/newer
backup.
This commit is contained in:
Marek Marczykowski-Górecki 2016-10-25 21:49:17 +02:00
parent f879771e24
commit c4b8166ffe
No known key found for this signature in database
GPG Key ID: F32894BE9684938A

View File

@ -64,12 +64,14 @@ Recovery - format version 3](/doc/backup-emergency-restore-v3/)
encrypted=True
compressed=True
compression-filter=gzip
backup_id=20161020T123455-1234
6. Verify the integrity and decrypt the `private.img` file which houses your data.
[user@restore ~]$ backup_id=20161020T123455-1234 # see backup-header above
[user@restore ~]$ for f_enc in vm1/private.img.???.enc; do \
f_dec=${f_enc%.enc}; \
echo "$f_dec!$backup_pass" | scrypt -P dec $f_enc $f_dec || break; \
echo "$backup_id!$f_dec!$backup_pass" | scrypt -P dec $f_enc $f_dec || break; \
done
**Note:** If the above fail, most likely your backup is corrupted, or been tampered with.