Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Update copy_back.py #456

Open
wants to merge 1 commit into
base: release_v2.0.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mysql_autoxtrabackup/backup_prepare/copy_back.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, config: str = path_config.config_path_file) -> None:
self.conf = config
options_obj = GeneralClass(config=self.conf)
self.command_options = options_obj.command_options
self.mysql_options = options_obj.backup_options
self.mysql_options = options_obj.mysql_options
self.backup_options = options_obj.backup_options

def shutdown_mysql(self) -> Union[None, bool, Exception]:
Expand Down Expand Up @@ -57,9 +57,9 @@ def move_data_dir(self) -> bool:

def run_xtra_copyback(self, data_dir: Optional[str] = None) -> Optional[bool]:
# Running Xtrabackup with --copy-back option
copy_back = "{} --copy-back {} --target-dir={}/{} --data_dir={}".format(
copy_back = "{} --copy-back {} --target-dir={}/{} --datadir={}".format(
self.backup_options.get("backup_tool"),
self.backup_options.get("xtra_options"),
self.backup_options.get("xtra_options") or "",
self.backup_options.get("full_dir"),
helpers.get_latest_dir_name(str(self.backup_options.get("full_dir"))),
self.mysql_options.get("data_dir") if data_dir is None else data_dir,
Expand Down