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

mariabackup --rsync option broken since 10.3

Details

    Description

      When running mariabackup with the --rsync option backups fail starting with MariaDB 10.3 with:

      rsync: link_stat "/var/lib/mysql/var/lib/mysql/ib_buffer_pool" failed: No such file or directory (2)

      Note how the datadir part in the path is duplicated.

      More complete output:

      root@ubuntu-focal:~# mariabackup --backup --user=root --rsync
      [00] 2022-07-15 13:23:14 Connecting to MySQL server host: localhost, user: root, password: not set, port: not set, socket: /run/mysqld/mysqld.sock
      [00] 2022-07-15 13:23:14 Using server version 10.5.16-MariaDB-1:10.5.16+maria~focal-log
      mariabackup based on MariaDB server 10.5.16-MariaDB debian-linux-gnu (x86_64)
      [...]
      [00] 2022-07-15 13:23:15 Starting rsync as: rsync -t . --files-from=/tmp/xtrabackup_rsyncfiles_pass1 /root/xtrabackup_backupfiles/
      rsync: link_stat "/var/lib/mysql/var/lib/mysql/ib_buffer_pool" failed: No such file or directory (2)
      rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
      [00] 2022-07-15 13:23:15 rsync finished successfully.
      [00] 2022-07-15 13:23:15 Finished a prep copy of non-InnoDB tables and files
      [00] 2022-07-15 13:23:15 Acquiring BACKUP LOCKS...
      [00] 2022-07-15 13:23:15 Starting to backup non-InnoDB tables and files
      [00] 2022-07-15 13:23:15 Starting rsync as: rsync -t . --files-from=/tmp/xtrabackup_rsyncfiles_pass2 /root/xtrabackup_backupfiles/
      rsync: link_stat "/var/lib/mysql/var/lib/mysql/ib_buffer_pool" failed: No such file or directory (2)
      rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
      [00] 2022-07-15 13:23:15 Error: rsync failed with error code 1
      mariabackup: Stopping log copying thread.[00] 2022-07-15 13:23:15 >> log scanned up to (55832)
      

      PS: I also wonder what this option is good for anyway?

      The documentation says:

      During normal operation, Mariabackup transfers local
      non-InnoDB files using a separate call to cp for each file. 
      Using this option, you can optimize this process by 
      performing this transfer with rsync, instead.
      

      which does not make sense to me as there is nothing for rsync to optimize if the target directory is empty anyways, as is required by mariabackup? So rsync would just fall back to a regular cp?

      Attachments

        Issue Links

          Activity

            The failure appeared in 10.2 after this commit:

            commit 17e0f5224c8339ec08707a6ad0397bbf8c19bbd3
            Author: Julius Goryavsky
            Date:   Tue Feb 22 10:45:06 2022 +0100
             
                MDEV-27524: Incorrect binlogs after Galera SST using rsync and mariabackup
            

            elenst Elena Stepanova added a comment - The failure appeared in 10.2 after this commit: commit 17e0f5224c8339ec08707a6ad0397bbf8c19bbd3 Author: Julius Goryavsky Date: Tue Feb 22 10:45:06 2022 +0100   MDEV-27524: Incorrect binlogs after Galera SST using rsync and mariabackup

            Seems to have been fixed meanwhile, can still reproduce it with e.g. 10.5.16, but could not anymore with latest 10.3, 10.5 and 10.10

            hholzgra Hartmut Holzgraefe added a comment - Seems to have been fixed meanwhile, can still reproduce it with e.g. 10.5.16, but could not anymore with latest 10.3, 10.5 and 10.10

            Fixed by MDEV-28758

            sysprg Julius Goryavsky added a comment - Fixed by MDEV-28758

            People

              sysprg Julius Goryavsky
              hholzgra Hartmut Holzgraefe
              Votes:
              1 Vote for this issue
              Watchers:
              5 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.