Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encryption and decryption don't work #6

Open
pata2004 opened this issue Jun 22, 2018 · 1 comment
Open

Encryption and decryption don't work #6

pata2004 opened this issue Jun 22, 2018 · 1 comment

Comments

@pata2004
Copy link

I UNCOMMENTED THE FOLLOWING LINES:
FILE: backup-mysql.sh
uncomment line 11 => encryption_key_file="${parent_dir}/encryption_key"
uncomment Line 37 => declare -ga innobackupex_args=(
uncomment line 38 => "--encrypt=AES256"
uncomment line 39 => "--encrypt-key-file=${encryption_key_file}"
uncomment line 40 => "--encrypt-threads=${processors}"
uncomment line 41 => "--slave-info"
uncomment line 42 => "--incremental"
Add the symbol line 43 => )

FILE: extract-mysql.sh
uncomment line 6 => encryption_key_file="/backups/mysql/encryption_key"
uncomment line 35 => Check whether the encryption key file is available
uncomment line 36 => if [ ! -r "${encryption_key_file}" ]; then
uncomment line 37 => error "Cannot read encryption key at ${encryption_key_file}"
uncomment line 38 => fi
uncomment line 51 => "--decrypt=AES256"
uncomment line 52 => "--encrypt-key-file=${encryption_key_file}"

WHEN I MADE "sudo su - backup extract-mysql.sh *.xbstream" I GET THE FOLLOWINGS ERRORS:
Extracting file incremental-06-22-2018_06-13-55.xbstream
mkdir: created directory './restore/incremental-06-22-2018_06-13-55'
/usr/local/bin/extract-mysql.sh: line 50: incremental-06-22-2018_06-13-55.xbstream: No such file or directory
/usr/local/bin/extract-mysql.sh: line 51: --decrypt=AES256: command not found
/usr/local/bin/extract-mysql.sh: line 52: --encrypt-key-file=/backups/mysql/encryption_key: No such file or directory
mariabackup based on MariaDB server 10.3.7-MariaDB Linux (x86_64)
180622 06:14:22 completed OK!
Finished work on incremental-06-22-2018_06-13-55.xbstream

BUT I HAVE:

  • incremental-06-22-2018_06-13-55.xbstream
  • encrypt-key-file=/backups/mysql/encryption_key

IT'S A BUG OR I MADE SOMETHING WRONG?
Many thanks

@lexelby
Copy link

lexelby commented Feb 21, 2019

I believe mariabackup does not support encryption, which is why those lines were commented out when @nullart added support for MariaDB.

Instead, try piping your backup through openssl enc encrypt -aes-256-cbc -salt -kfile <key file>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants