diff --git a/agent/site.py b/agent/site.py index 6bbb7612..13a363d7 100644 --- a/agent/site.py +++ b/agent/site.py @@ -12,7 +12,7 @@ from agent.base import AgentException, Base from agent.job import job, step -from agent.utils import b2mb, get_size +from agent.utils import b2mb, get_size, cint if TYPE_CHECKING: from agent.bench import Bench @@ -47,7 +47,7 @@ def __init__(self, name: str, bench: "Bench"): self.user = self.config["db_name"] self.password = self.config["db_password"] self.host = self.config.get("db_host", self.bench.host) - self.port = self.config.get("db_port", self.bench.db_port) + self.port = cint(self.config.get("db_port", self.bench.db_port)) def bench_execute(self, command, input=None): return self.bench.docker_execute( @@ -505,6 +505,8 @@ def tablewise_backup(self): sort_keys=True, ) data = {"tables": {}} + db_port = self.config.get("db_port", 3306) + for table in tables: backup_file = os.path.join( self.backup_directory, f"{table}.sql.gz"