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

Mariabackup copies binary logs to backup directory

Details

    Description

      Hi,

      I have log_bin specified to the data directory:
      /etc/my.cnf.d/common.cnf:12:log_bin="/var/lib/mysql/mariadb"

      In the mariabackup output, I see that mariabackup copies the binary logs to the backup directory:
      [00] 2022-06-06 19:22:58 Compressing /var/lib/mysql/mariadb.000270 to /backupdisk/diff-2022-06-06_19-07-01/mariadb.000270.qp

      This is needless consumption of space on the backup disk.

      I did not find a command-line switch to disable copying the binary logs, I think this is a bug in mariabackup to just copy all the files that are in the data directory.

      Specifying a custom binlog directory is NOT a work-around for this issue. It does not seam that the general log is stored with the backup, so why can the binary logs not be excepted?

      Earlier bakup runs (with a different mariabackup version) did not show this issue, it seams some thing changed in mariabackup.

      My current version:
      mariabackup based on MariaDB server 10.3.35-MariaDB Linux (x86_64)
      [00] 2022-06-06 10:26:07 Using server version 10.3.31-MariaDB-log
      /usr/bin/mariabackup based on MariaDB server 10.3.35-MariaDB Linux (x86_64)

      The older runs were slightly different versions:
      [00] 2022-03-23 00:07:01 Using server version 10.3.31-MariaDB-log
      /usr/bin/mariabackup based on MariaDB server 10.3.34-MariaDB Linux (x86_64)

      Thank you,
      Michaël

      Attachments

        Issue Links

          Activity

            antonp1976 Anton Petin added a comment -

            This is a very serious bug, cause we store bin logs and snapshots of data for a long time. Each snapshot is around 1Tb and binlogs for 1Tb at all, so when we take an snapshot with new version of mariabackup - full backup is around 2Tb and long lock time while backuping.

            Now we are using mariabackup 10.5.15 on 10.5.16 server, but i think it's not normal for such company like MariaDB not to solve it.

            antonp1976 Anton Petin added a comment - This is a very serious bug, cause we store bin logs and snapshots of data for a long time. Each snapshot is around 1Tb and binlogs for 1Tb at all, so when we take an snapshot with new version of mariabackup - full backup is around 2Tb and long lock time while backuping. Now we are using mariabackup 10.5.15 on 10.5.16 server, but i think it's not normal for such company like MariaDB not to solve it.

            After an Update we also ran into this Bug. Please fix this or give us a hint how to prevent the creation of binlog archives in backup dir.

            mariadb-backup --backup --host=localhost --user=root --password=xxx--target-dir /export/mariadbbackup/$(hostname)/$date --parallel=8 --compress --compress-threads=4
            

            avalor Andreas Hering added a comment - After an Update we also ran into this Bug. Please fix this or give us a hint how to prevent the creation of binlog archives in backup dir. mariadb-backup --backup --host=localhost --user=root --password=xxx--target-dir /export/mariadbbackup/$(hostname)/$date --parallel=8 --compress --compress-threads=4
            serg Sergei Golubchik added a comment - - edited

            be286c57a looks ok to me

            serg Sergei Golubchik added a comment - - edited be286c57a looks ok to me

            ok to push

            jplindst Jan Lindström (Inactive) added a comment - ok to push
            sysprg Julius Goryavsky added a comment - https://github.com/MariaDB/server/commit/7fb1f919d0629d0c2bc68c616de557b658068fa0 https://github.com/MariaDB/server/commit/5b4154373a93b323c3502692c46dcc51b1731785 https://github.com/MariaDB/server/commit/5197519f4f7b31c61e3abccf75650e5356aecd4c

            People

              sysprg Julius Goryavsky
              michaeldg Michaël de groot
              Votes:
              13 Vote for this issue
              Watchers:
              30 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.