[MDEV-20703] mariabackup creates binlog files in server binlog directory on --prepare --export step Created: 2019-10-01  Updated: 2020-08-25  Resolved: 2019-10-01

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.2.28, 10.3.19, 10.4.9

Type: Bug Priority: Major
Reporter: Vladislav Lesin Assignee: Vladislav Lesin
Resolution: Fixed Votes: 0
Labels: None


 Description   

If mariabackup is executed with the following options:

mariabackup --defaults-file=path_to/my.cnf --prepare --export --target-dir=$targetdir;

and "path_to/my.cnf" switches on binary logs, then it will create binary logs in the directory, pointed out in "log-bin" option. If "path_to/my.cnf" is also used by the server, such behaviour can cause issues.

The general issue is if "--export" mariabackup option is used, mariabackup starts the server in bootstrap mode to generate *.cfg files for the certain innodb tables. The started instance of the server reads options from the file, pointed out in "--defaults-file" mariabackup option.



 Comments   
Comment by Vladislav Lesin [ 2019-10-01 ]

Testing: https://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.2-MDEV-20703-binlog-mariabackup

Comment by Vladislav Lesin [ 2019-11-15 ]

When "--export" mariabackup option is used, mariabackup starts the server in
bootstrap mode to generate *.cfg files for the certain innodb tables.
The started instance of the server reads options from the file, pointed
out in "--defaults-file" mariabackup option.

If the server uses the same config file as mariabackup, and binlog is
switched on in that config file, then "mariabackup --prepare --export"
will create binary log files in the server's binary log directory, what
can cause issues.

The fix is to add "--skip-log-bin" in mysld options when the server is
started to generate *.cfg files.

If mariabackup upgrade is not desirable, the workaround is to run
mariabackup with --defaults option, and use separate config file for
mariabackup with binary log switched off.

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