Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-3786

In 1.4.2, columnstoreRestore checks wrong directory for datadir

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.4.2
    • 1.4.3
    • None
    • None

    Description

      In 1.4.2, columnstoreBackup backs up the MariaDB datadir to $umBackupdir/mysql. See the following log snippet:

      ...
      [2020-02-11 23:48:11] Backing up UMs
      [2020-02-11 23:48:11] Backing up um1
      [2020-02-11 23:48:11] rsync -a -z --delete --link-dest=../backup.1/um1 root@172.30.0.83:/var/lib/mysql /tmp/backup//um1
      [2020-02-11 23:48:13] DONE
      ...
      

      Based on the above output, we can guess that /var/lib/mysql will be backed up as /tmp/backup/um1/mysql. That is exactly what happens:

      $ sudo ls -ld /tmp/backup/um1/mysql
      drwxr-xr-x. 8 mysql mysql 4096 Feb 11 22:58 /tmp/backup/um1/mysql
      

      Unfortunately, when columnstoreRestore tries to restore /var/lib/mysql, it expects to find the backup at /tmp/backup/um1/db. See the following log snippet:

      ...
      [2020-02-12 00:26:56] Restoring UMs
      [2020-02-12 00:26:56] Restoring um1...
      [2020-02-12 00:26:56] rsync -a -z --delete /tmp/backup//um1/db/ root@172.30.0.83:/var/lib/mysql
      [2020-02-12 00:26:56] ERROR: Rsync command failed.
      [2020-02-12 00:26:56] ERROR Command: rsync -a -z --delete /tmp/backup//um1/db/ root@172.30.0.83:/var/lib/mysql
      [2020-02-12 00:26:56] Restore Status: Failed
      

      The problem seems to be caused by an incorrect path in this section of the code in columnstoreRestore:

      ###############################################################################
      # Restore UM
      ###############################################################################
      restoreUM () {
      printLog "Restoring UMs"
      for (( moduleID=1; moduleID<=$restore_umModuleCount; moduleID++ ))
      do
          umBackupDir="um""$moduleID"
          if [ -e $BACKUP_SERVER_LOCATION/$umBackupDir ]; then
              printLog "Restoring $umBackupDir..."
              executeRsync $DRY_RUN "" $BACKUP_SERVER_LOCATION/$umBackupDir/db/ $REMOTE_USER@${restore_umModuleIP[$moduleID]}:/var/lib/mysql
          fi
      printLog "DONE"
      done
      }
      

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 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.