feat: add debug logging to mydumper

This commit is contained in:
Michael Reichenbach 2021-03-09 07:05:37 +01:00 committed by Silthus
parent a210202945
commit 3ea36a1d93

View file

@ -36,6 +36,11 @@ class MariadbContainer(Container):
"""list: create a dump command restic and use to send data through stdin""" """list: create a dump command restic and use to send data through stdin"""
creds = self.get_credentials() creds = self.get_credentials()
destination = self.backup_destination_path() destination = self.backup_destination_path()
verbosity = 2
if self.get_config.log_level == 'debug':
verbosity = 3
return [ return [
"mydumper", "mydumper",
"--user", "--user",
@ -51,7 +56,9 @@ class MariadbContainer(Container):
"--no-views", "--no-views",
"--compress", "--compress",
"--regex", "--regex",
"'^(?!(mysql\.))'" "'^(?!(mysql\.))'",
"--verbose",
f"{verbosity}"
] ]
def backup(self): def backup(self):
@ -111,6 +118,11 @@ class MysqlContainer(Container):
"""list: create a dump command restic and use to send data through stdin""" """list: create a dump command restic and use to send data through stdin"""
creds = self.get_credentials() creds = self.get_credentials()
destination = self.backup_destination_path() destination = self.backup_destination_path()
verbosity = 2
if self.get_config.log_level == 'debug':
verbosity = 3
return [ return [
"mydumper", "mydumper",
"--user", "--user",
@ -126,7 +138,9 @@ class MysqlContainer(Container):
"--no-views", "--no-views",
"--compress", "--compress",
"--regex", "--regex",
"'^(?!(mysql\.))'" "'^(?!(mysql\.))'",
"--verbose",
f"{verbosity}"
] ]
def backup(self): def backup(self):