Use mariadb-backup binary name for backup
mariabackup is a deprecated binary name and mariadb-backup should be used instead. mariadb-backup is available since 10.4 release so it should be present in all currently supported versions. Change-Id: I7d478b83d9c2e5d1c6aabefef94881ab84f021a1
This commit is contained in:
@@ -24,18 +24,18 @@ CONF = cfg.CONF
|
||||
|
||||
|
||||
class MariaBackup(mysql_base.MySQLBaseRunner):
|
||||
"""Implementation of Backup and Restore using mariabackup."""
|
||||
"""Implementation of Backup and Restore using mariadb-backup."""
|
||||
restore_cmd = ('mbstream -x -C %(restore_location)s')
|
||||
prepare_cmd = 'mariabackup --prepare --target-dir=%(restore_location)s'
|
||||
prepare_cmd = 'mariadb-backup --prepare --target-dir=%(restore_location)s'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(MariaBackup, self).__init__(*args, **kwargs)
|
||||
self.backup_log = '/tmp/mariabackup.log'
|
||||
self.backup_log = '/tmp/mariadb-backup.log'
|
||||
self._gzip = True
|
||||
|
||||
@property
|
||||
def cmd(self):
|
||||
cmd = ('mariabackup --backup --stream=xbstream ' +
|
||||
cmd = ('mariadb-backup --backup --stream=xbstream ' +
|
||||
self.user_and_pass)
|
||||
return cmd
|
||||
|
||||
@@ -65,8 +65,8 @@ class MariaBackup(mysql_base.MySQLBaseRunner):
|
||||
|
||||
|
||||
class MariaBackupIncremental(MariaBackup):
|
||||
"""Incremental backup and restore using mariabackup."""
|
||||
incremental_prep = ('mariabackup --prepare '
|
||||
"""Incremental backup and restore using mariadb-backup."""
|
||||
incremental_prep = ('mariadb-backup --prepare '
|
||||
'--target-dir=%(restore_location)s '
|
||||
'%(incremental_args)s')
|
||||
|
||||
@@ -81,7 +81,7 @@ class MariaBackupIncremental(MariaBackup):
|
||||
@property
|
||||
def cmd(self):
|
||||
cmd = (
|
||||
'mariabackup --backup --stream=xbstream'
|
||||
'mariadb-backup --backup --stream=xbstream'
|
||||
' --incremental-lsn=%(lsn)s ' +
|
||||
self.user_and_pass
|
||||
)
|
||||
|
@@ -65,7 +65,7 @@ class TestMariaBackup(unittest.TestCase):
|
||||
runner = self.runner_cls(**self.params)
|
||||
|
||||
# assertions
|
||||
cmd = ("mariabackup --backup --stream=xbstream {}".format(
|
||||
cmd = ("mariadb-backup --backup --stream=xbstream {}".format(
|
||||
runner.user_and_pass))
|
||||
self.assertEqual(runner.cmd, cmd)
|
||||
|
||||
@@ -100,7 +100,7 @@ class TestMariaBackupIncremental(unittest.TestCase):
|
||||
|
||||
# assertions
|
||||
cmd = (
|
||||
'mariabackup --backup --stream=xbstream'
|
||||
'mariadb-backup --backup --stream=xbstream'
|
||||
' --incremental-lsn=%(lsn)s ' +
|
||||
runner.user_and_pass
|
||||
)
|
||||
|
6
releasenotes/notes/mariadb-backup-1cd69e9f82e992fb.yaml
Normal file
6
releasenotes/notes/mariadb-backup-1cd69e9f82e992fb.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
other:
|
||||
- |
|
||||
A ``mariabackup`` binary has been replaced with ``mariadb-backup`` in
|
||||
the backup script for MariaDB. This might be not compatible with MariaDB
|
||||
versions before 10.4
|
Reference in New Issue
Block a user