Not the answer you need?
Register and ask your own question!

stream + compress + crypt a backup

cristiano.politowskicristiano.politowski EntrantLegacy User Role Beginner
Hi folks.

I'm making a incremental backup per month, and in the end of the month I want to stream, compress and crypt this folder. I was doing this way:
innobackupex --user="${USER}" --password="${PASS}" --stream=xbstream --compress "${BASE_DIR}" -encrypt="${CRYPT_ALG}" --encrypt-key-file="${BASE_DIR}"/key > /vagrant/backup.xbstream

Everything seems to work, but when I want prepare it:
xbstream -x -C /dir/backup < backup.xbstream
innobackupex --user="${USER}" --password="${PASS}" --decompress --decrypt="${CRYPT_ALG}" --encrypt-key-file="${BASE_DIR}"/key /dir/backup

a error occurred:
xb_stream_read_chunk(): wrong chunk magic at offset...

Searching I found this:, that said to decrypt first. But how? If I run the second command first, It ask for a directory, not a file (backup.xbstream).

Someone can help me?
Thanks and sorry by the poor English
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.