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

mariabackup SST fail if data-directory have lost+found directory

Details

    Description

      Mariabackup SST fail if database directory contains lost+found

       rm: cannot remove ‘/data/lib/mariadb/lost+found’: Permission denied
      
      

      scripts/wsrep_sst_mariabackup.sh does not exclude lost+found directory while performing SST

      https://github.com/MariaDB/server/blob/93ac7ae70ff000353538f732899b421a3f2ea7ce/scripts/wsrep_sst_mariabackup.sh

      Attachments

        Issue Links

          Activity

            jplindst Jan Lindström (Inactive) added a comment - Some idea can be see https://github.com/mariadb/server/commit/44e3046d3b09a21e21295979d6ddad9f332ebadd

            I think that the mariabackup --databases-exclude option should be applicable. It probably expects a regular expression as a parameter, and the + likely is a regular expression meta-character that will need escaping. You should also test that the argument will only match a full string, in case someone does CREATE DATABASE `#mysql50#not_lost+found`;.

            marko Marko Mäkelä added a comment - I think that the mariabackup --databases-exclude option should be applicable. It probably expects a regular expression as a parameter, and the + likely is a regular expression meta-character that will need escaping. You should also test that the argument will only match a full string, in case someone does CREATE DATABASE `#mysql50#not_lost+found`; .
            sysprg Julius Goryavsky added a comment - Fixed, patch here: https://github.com/MariaDB/server/commit/909cd1a6ba52b28a705190d7576a15cd38ebea9e

            Please add mtr test as described on git comment.

            jplindst Jan Lindström (Inactive) added a comment - Please add mtr test as described on git comment.

            Added a test that checks the correct operation in the presence of databases, which can potentially cause problems when checking names. Also patch has been rebased to 10.2 branch (latest revision):

            https://github.com/MariaDB/server/commit/e1875eeb251aa83a3dc8ab148228d2de42671699

            sysprg Julius Goryavsky added a comment - Added a test that checks the correct operation in the presence of databases, which can potentially cause problems when checking names. Also patch has been rebased to 10.2 branch (latest revision): https://github.com/MariaDB/server/commit/e1875eeb251aa83a3dc8ab148228d2de42671699

            ok to push.

            jplindst Jan Lindström (Inactive) added a comment - ok to push.
            sysprg Julius Goryavsky added a comment - merged with head revision, https://github.com/MariaDB/server/commit/888010d9dd5409c48caf01fb0f465c98caa232c7

            People

              sysprg Julius Goryavsky
              pramod.mahto@mariadb.com Pramod Mahto
              Votes:
              1 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.