Skip to content

Commit

Permalink
Emergency restore v2/v3: hardcode MD5 algo for decryption
Browse files Browse the repository at this point in the history
  • Loading branch information
rustybird committed Nov 4, 2022
1 parent 5b2471f commit 682508f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions user/how-to-guides/backup-emergency-restore-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ encrypted and compressed.
4. Decrypt the `private.img` file.
~~~
[user@restore vm1]$ openssl enc -d -pass pass:"$backup_pass" -aes-256-cbc -in private.img.000 -out private.img.dec.000
[user@restore vm1]$ openssl enc -d -md MD5 -pass pass:"$backup_pass" -aes-256-cbc -in private.img.000 -out private.img.dec.000
~~~
**Note:** For multi-part files, a loop can be used:
~~~
find -name 'private.img.*' | sort -V | while read f; do
openssl enc -d -pass pass:"$backup_pass" -aes-256-cbc -in $f -out
openssl enc -d -md MD5 -pass pass:"$backup_pass" -aes-256-cbc -in $f -out
${f/.img/.img.dec}
done
~~~
Expand Down
2 changes: 1 addition & 1 deletion user/how-to-guides/backup-emergency-restore-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ any GNU/Linux system with the following procedure.

6. Decrypt the `private.img` file.

[user@restore vm1]$ find -name 'private.img.*[0-9]' | sort -V | xargs cat | openssl enc -d -pass pass:"$backup_pass" -aes-256-cbc -out private.img.dec
[user@restore vm1]$ find -name 'private.img.*[0-9]' | sort -V | xargs cat | openssl enc -d -md MD5 -pass pass:"$backup_pass" -aes-256-cbc -out private.img.dec

**Note:** If your backup was encrypted with a cipher algorithm other than
`aes-256-cbc`, you must substitute the correct cipher command. This
Expand Down

0 comments on commit 682508f

Please sign in to comment.