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

mbstream Recreates xtrabackup_info On Same Directory as Backup File

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2.21
    • Fix Version/s: 10.2.28
    • Component/s: Backup
    • Labels:
      None
    • Environment:
      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

            • Assignee:
              vlad.lesin Vladislav Lesin
              Reporter:
              dotmanila Jervin R
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: