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
1 changed files with 16 additions and 2 deletions

View File

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