Merge branch 'rustybird-over100gb'

This commit is contained in:
Andrew David Wong 2020-10-09 20:34:09 -05:00
commit 2af2041732
No known key found for this signature in database
GPG Key ID: 8CE137352A019A17
3 changed files with 16 additions and 23 deletions

View File

@ -68,7 +68,7 @@ encrypted and compressed.
**Note:** For multi-part files, a loop can be used: **Note:** For multi-part files, a loop can be used:
~~~ ~~~
for f in private.img.*; do find -name 'private.img.*' | sort -V | while read f; do
openssl enc -d -pass pass:your_passphrase -aes-256-cbc -in $f -out openssl enc -d -pass pass:your_passphrase -aes-256-cbc -in $f -out
${f/.img/.img.dec} ${f/.img/.img.dec}
done done

View File

@ -93,7 +93,7 @@ any GNU/Linux system with the following procedure.
5. Decrypt the `private.img` file. 5. Decrypt the `private.img` file.
[user@restore vm1]$ cat private.img.??? | openssl enc -d -pass pass:your_passphrase -aes-256-cbc -out private.img.dec [user@restore vm1]$ find -name 'private.img.*[0-9]' | sort -V | xargs cat | openssl enc -d -pass pass:your_passphrase -aes-256-cbc -out private.img.dec
**Note:** If your backup was encrypted with a cipher algorithm other than **Note:** If your backup was encrypted with a cipher algorithm other than
`aes-256-cbc`, you must substitute the correct cipher command. This `aes-256-cbc`, you must substitute the correct cipher command. This

View File

@ -145,39 +145,32 @@ Emergency Recovery Instructions
[user@restore ~]$ backup_id=20161020T123455-1234 [user@restore ~]$ backup_id=20161020T123455-1234
6. Verify the integrity of and decrypt the `private.img` file that houses your 6. Verify the integrity of your data, decrypt, decompress, and extract `private.img`:
data.
[user@restore ~]$ for f_enc in vm1/private.img.???.enc; do \ [user@restore ~]$ find vm1 -name 'private.img.*.enc' | sort -V | while read f_enc; do \
f_dec=${f_enc%.enc}; \ f_dec=${f_enc%.enc}; \
echo "$backup_id!$f_dec!$backup_pass" | scrypt dec -P $f_enc $f_dec || break; \ echo "$backup_id!$f_dec!$backup_pass" | scrypt dec -P $f_enc || break; \
done done | gzip -d | tar -xv
**Note:** If this command fails, it is likely that the backup is corrupted
or has been tampered with.
7. Decompress and untar the decrypted `private.img` file.
[user@restore ~]$ cat vm1/private.img.??? | gzip -d | tar -xv
vm1/private.img vm1/private.img
If this pipeline fails, it is likely that the backup is corrupted or has
been tampered with.
**Note:** If your backup was compressed with a program other than `gzip`, **Note:** If your backup was compressed with a program other than `gzip`,
you must substitute the correct compression program. This information is you must substitute the correct compression program in the command above.
contained in `backup-header` (see step 4). For example, if you used `bzip2`, This information is contained in `backup-header` (see step 4). For example,
then you should do this: if your backup is compressed with `bzip2`, use `bzip2 -d` instead in the
command above.
[user@restore vm1]$ mv private.img.dec private.img.dec.bz2 7. Mount `private.img` and access your data.
[user@restore vm1]$ bunzip2 private.img.dec.bz2
8. Mount `private.img` and access your data.
[user@restore vm1]$ sudo mkdir /mnt/img [user@restore vm1]$ sudo mkdir /mnt/img
[user@restore vm1]$ sudo mount -o loop vm1/private.img /mnt/img/ [user@restore vm1]$ sudo mount -o loop vm1/private.img /mnt/img/
[user@restore vm1]$ cat /mnt/img/home/user/your_data.txt [user@restore vm1]$ cat /mnt/img/home/user/your_data.txt
This data has been successfully recovered! This data has been successfully recovered!
9. Success! If you wish to recover data from more than one VM in your backup, 8. Success! If you wish to recover data from more than one VM in your backup,
simply repeat steps 6--8 for each additional VM. simply repeat steps 6 and 7 for each additional VM.
**Note:** You may wish to store a copy of these instructions with your **Note:** You may wish to store a copy of these instructions with your
Qubes backups in the event that you fail to recall the above procedure Qubes backups in the event that you fail to recall the above procedure