Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-20703

mariabackup creates binlog files in server binlog directory on --prepare --export step

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2(EOL), 10.3(EOL), 10.4(EOL)
    • 10.2.28, 10.3.19, 10.4.9
    • Backup
    • 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.

      Attachments

        Activity

          vlad.lesin Vladislav Lesin added a comment - Testing: https://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.2-MDEV-20703-binlog-mariabackup

          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.

          vlad.lesin Vladislav Lesin added a comment - 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.

          People

            vlad.lesin Vladislav Lesin
            vlad.lesin Vladislav Lesin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.