[MDEV-26513] mariabackup --prepare --export fails if innodb_undo_directory is set and original mariadb is running Created: 2021-08-31  Updated: 2021-08-31

Status: Open
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.5.11
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Volker Klasen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Hello,

executing "mariabackup --prepare --export" on a server with the original mariadb server process running fails if innodb_undo_directory is set (to an absolute path) as the newly started process cannot get the lock on the undo files.

How to reproduce:

  • set innodb_undo_tablespaces to 3 (this is probably irrelevant)
  • set innodb_undo_directory to an absolute path and restart mariadb
  • create a backup with "mariabackup --backup --defaults-file=<path_to_original_my.cnf>"
  • run "mariabackup --prepare --export"

In the log file (*.err) you will find some errors:

[ERROR] InnoDB: Unable to lock <innodb_undo_directory>/undo001 error: 11

The reason is that innodb_undo_directory is set in backup-my.cnf to the same path as for the original server.
If you comment out or delete innodb_undo_directory from backup-my.cnf, running mariabackup with export works fine.

So the fix would be not to include innodb_undo_directory in backup-my.cnf during backup.

Cheers
Volker


Generated at Thu Feb 08 09:45:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.