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

mbstream Recreates xtrabackup_info On Same Directory as Backup File

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.21
    • 10.2.28
    • Backup
    • None
    • CentOS 7.x

    Description

      Backup is created with the command below:

      mariabackup --host=localhost  --password=*******  --user=percona  --no-timestamp --backup --incremental-basedir=/var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_02_53 --stream=xbstream --parallel=4 --extra-lsndir=/var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56 --binlog-info=on --target-dir /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56
      

      It creates this file:

      [root@ip-10-1-2-91 ~]# ls -alh /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs
      -rw-r--r--. 1 root root 280M Jan 31 20:37 /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs
      [root@ip-10-1-2-91 ~]# file /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs
      /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs: data
      [root@ip-10-1-2-91 ~]#
      

      While trying to extract the data to another folder, it works the first time but not on the second because it also extracted a copy of xtrabackup_info on the same folder where the xbs file is.

      [root@ip-10-1-2-91 2019_01_31-20_36_56]# pwd
      /var/bkp/work/2019_01_31-20_36_56
      [root@ip-10-1-2-91 2019_01_31-20_36_56]# cat /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs | mbstream -x -C .
      [root@ip-10-1-2-91 2019_01_31-20_36_56]# rm -rf *
      [root@ip-10-1-2-91 2019_01_31-20_36_56]# cat /var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56/backup.xbs | mbstream -x -C .
      mbstream: Can't create/write to file '/var/bkp/stor/incr/2019_01_31-19_07_34/2019_01_31-20_36_56//xtrabackup_info' (Errcode: 17 "File exists")
      mbstream: failed to create file.
      [root@ip-10-1-2-91 2019_01_31-20_36_56]#
      

      This is minor since we can just make sure to remove that file, but the purpose of -C is to not write anything on any other folder except the one specified.

      Attachments

        Activity

          People

            vlad.lesin Vladislav Lesin
            dotmanila Jervin R
            Votes:
            2 Vote for this issue
            Watchers:
            6 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.