I wanted to have my backups AES encrypted. Configured AES encryption using a key file. Then took one of the Backup and Restore encrypted files and tried

mcrypt -b -d -a rijndael-128 -f aes2015.key  mysite-2015-06-30T23-11-35.mysql.gz.aes 
Unknown suffix. Will append '.dc'.
mysite-2015-06-30T23-11-35.mysql.gz.aes was decrypted.

But when I run "gunzip" on the resulting file, it responds with "not in gzip format". Looking at the source code for backup and restore, it seems that there is some extra stuff getting done - data packed and padded. Is this what is preventing the correct decryption? Can I do anything to decrypt the file manually using Linux command-line tools?

Thanks

Myrosia

Comments

jukka792’s picture

Hi,

I have the same issue, need to decrypt the file manually. Currently the only way (what I know) is to restore the AES encrypted file with the Backup & Migrate module on the SAME site. But what if the original site is not available anymore? How to restore the files from other site or manually? I have the Key -file and Initialization vector..

Please advice

ranelpadon’s picture

We encountered a similar use case: decrypt the AES-encrypted backup files via terminal and not via the Drupal Admin UI (which is not possible when site is down). We ended up creating a stand-alone, custom PHP script that could be run in terminal. Our custom script successfully decrypted the files. See details here: http://dropbucket.org/node/9160.