Details
Description
Preparing a backup taken on a server with data-at-rest encryption enabled fails with
mariabackup: Can't open shared library '/file_key_management.so' (errno: 2, cannot open shared object file: No such file or directory)
The prepare only succeeds after explicitly adding --plugin-dir=/usr/lib/mysql/plugins, which should not be necessary as it is the default path anyway.
Full log output:
# mariabackup --prepare
|
 |
mariabackup based on MariaDB server 10.5.16-MariaDB debian-linux-gnu (x86_64)
|
[00] 2022-07-15 13:30:22 cd to /root/xtrabackup_backupfiles/
|
[00] 2022-07-15 13:30:22 open files limit requested 0, set to 1024
|
[00] 2022-07-15 13:30:22 Loading encryption plugin from file_key_management=file_key_management
|
[00] 2022-07-15 13:30:22 Loading encryption plugin
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--socket=/run/mysqld/mysqld.sock'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--pid-file=/run/mysqld/mysqld.pid'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--basedir=/usr'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--bind-address=127.0.0.1'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--expire_logs_days=10'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--character-set-server=utf8mb4'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--collation-server=utf8mb4_general_ci'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--plugin_load_add=file_key_management'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--file_key_management_filename=/etc/mysql//keyfile.enc'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--file_key_management_filekey=FILE:/etc/mysql/keyfile.key'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--file_key_management_encryption_algorithm=AES_CTR'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--innodb_encrypt_tables=FORCE'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--innodb_encrypt_log=ON'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--innodb_encrypt_temporary_tables=ON'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--innodb_encryption_threads=4'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--innodb_encryption_rotate_key_age=1'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--innodb_default_encryption_key_id=1'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--aria_encrypt_tables=ON'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--encrypt_tmp_disk_tables=ON'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--encrypt_tmp_files=ON'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--encrypt_binlog=ON'
|
[00] 2022-07-15 13:30:22 Encryption plugin parameter : '--prepare'
|
mariabackup: Can't open shared library '/file_key_management.so' (errno: 2, cannot open shared object file: No such file or directory)
|
2022-07-15 13:30:22 0 [ERROR] Couldn't load plugin 'file_key_management' from 'file_key_management.so'.
|
[00] 2022-07-15 13:30:22 This target seems to be not prepared yet.
|
[00] 2022-07-15 13:30:22 mariabackup: using the following InnoDB configuration for recovery:
|
[00] 2022-07-15 13:30:22 innodb_data_home_dir = .
|
[00] 2022-07-15 13:30:22 innodb_data_file_path = ibdata1:10M:autoextend
|
[00] 2022-07-15 13:30:22 innodb_log_group_home_dir = .
|
[00] 2022-07-15 13:30:22 InnoDB: Using Linux native AIO
|
[00] 2022-07-15 13:30:22 Starting InnoDB instance for recovery.
|
[00] 2022-07-15 13:30:22 mariabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
|
2022-07-15 13:30:22 0 [Note] InnoDB: Uses event mutexes
|
2022-07-15 13:30:22 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
|
2022-07-15 13:30:22 0 [Note] InnoDB: Number of pools: 1
|
2022-07-15 13:30:22 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
|
2022-07-15 13:30:22 0 [Note] InnoDB: Using Linux native AIO
|
2022-07-15 13:30:22 0 [Note] InnoDB: Initializing buffer pool, total size = 104857600, chunk size = 104857600
|
2022-07-15 13:30:22 0 [Note] InnoDB: Completed initialization of buffer pool
|
2022-07-15 13:30:22 0 [ERROR] InnoDB: Obtaining redo log encryption key version 1 failed (4294967295). Maybe the key or the required encryption key management plugin was not found.
|
2022-07-15 13:30:22 0 [ERROR] InnoDB: Reading checkpoint encryption info failed.
|
2022-07-15 13:30:22 0 [ERROR] InnoDB: No valid checkpoint found (corrupted redo log). You can try --innodb-force-recovery=6 as a last resort.
|
2022-07-15 13:30:22 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
|
[00] FATAL ERROR: 2022-07-15 13:30:22 mariabackup: innodb_init() returned 11 (Generic error).
|