[MDEV-14150] mariabackup --prepare --plugin-load=aws_key_managment crashses Created: 2017-10-26  Updated: 2018-01-22  Resolved: 2018-01-22

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.2.8, 10.2.9
Fix Version/s: 10.1.31, 10.2.13, 10.3.5

Type: Bug Priority: Major
Reporter: Dave Juntgen Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None
Environment:

Centos 7


Attachments: PNG File image-2017-10-26-12-42-06-376.png     PNG File image-2017-10-26-12-47-21-883.png     Text File mariabackup-crash-report.txt     PNG File screenshot-1.png     PNG File screenshot-2.png    
Sprint: 10.0.34

 Description   

mariabackup fails during prepare and aws_key_management plugin load to decrypt data.



 Comments   
Comment by Vladislav Vaintroub [ 2017-10-26 ]

you pass plugin-load=aws_key_managment on the command line? This is not necessary, mariabackup already has corresponding option in my-backup.ini

Comment by Vladislav Vaintroub [ 2017-10-26 ]

Could you provide the full output as text file, redirecting stdout of mariabackup to a file?

Comment by Dave Juntgen [ 2017-10-26 ]

I'm in a secure environment, copy paste isn't accessible nor can I move data files in and out. (sorry its a pain)

When removing the plugin-load=aws_key_management, the following error occurs:

  1. The aws keys are there from the initial mariabackup.
Comment by Vladislav Vaintroub [ 2017-10-26 ]

Can you prepare backup on the same machine, as the same user where you took the backup first?
It can be anything, ranging from aws_key_management.so being missing, to missing aws credentials.

if the .so is there, you can edit backup-my.cnf file to switch on the AWS KMS plugin trace logging to see what happens there.

Comment by Dave Juntgen [ 2017-10-26 ]

Using mariabackup v10.2.9

  1. Executed the backup and the restore on the same server
  2. Outcome is the same
  3. Set aws log to trace, but I do not see any trace logs, it almost looks like the plugin isn't being loaded.
Comment by Vladislav Vaintroub [ 2017-10-26 ]

well, then I guess you need to examine the contents of backup-my.cnf.
the backup does store some information about encryption plugin (actually, all plugin parameters there). And, prepare is written to read the contents of backup-my.cnf .

Comment by Dave Juntgen [ 2017-10-27 ]

Please see the attached crash report, I've tried several attempts.

mariabackup --backup --parallel=8 --rsync --user=root --password=x
mariabackup --prepare --parallel=8 --user=root --password=x --innodb-encrypt-log=1 --plugin-load=aws_key_management --plugin-dir=/usr/lib64/mysql/plugin/

mariabackup-crash-report.txt

I am unable to get any sort of reasonable output with just a simple --prepare command like such:

mariabackup --prepare --parallel=8 --user=root --password=x

Comment by Vladislav Vaintroub [ 2017-10-27 ]

--prepare does not need user, or password, it does not contact any server.. , it does not understand --innodb-encrypt-log either, it is not a server.

Kudos on getting text output. I hope now you can send also the backup-my.cnf in the backup directory, or maybe even a picture of it would also suffice

Comment by Vladislav Vaintroub [ 2017-10-27 ]

can you try all of this without ---rsync. We did not test it here, not (I suspect) percona had.
I'd recommend to provide --target-dir parameters as well (unless you use streaming)

Comment by Dave Juntgen [ 2017-10-30 ]

Great news, removing --rsync and adding --target-dir= produced a successful backup and prepare!

Comment by Vladislav Vaintroub [ 2018-01-22 ]

I assume it failed because mariabackup had not found rsync utility. I'll now check it earlier before starting the backup.
If you happen to have the log of "mariabackup --backup", you can attach it here.

Generated at Thu Feb 08 08:11:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.