Skip to content

Commit

Permalink
Drop fix-s3-oplog command related to unsupported ClickHouse feature s…
Browse files Browse the repository at this point in the history
…end_metadata (#41)
  • Loading branch information
Alex-Burmak committed Aug 28, 2023
1 parent 54d278b commit 3440923
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 169 deletions.
27 changes: 0 additions & 27 deletions ch_backup/ch_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
TerminatingSignal,
)
from ch_backup.logic.access import AccessBackup
from ch_backup.logic.cloud_storage_utils import fix_s3_oplog
from ch_backup.logic.database import DatabaseBackup
from ch_backup.logic.table import TableBackup
from ch_backup.logic.udf import UDFBackup
Expand Down Expand Up @@ -299,32 +298,6 @@ def restore(
keep_going=keep_going,
)

# pylint: disable=too-many-nested-blocks,too-many-branches
def fix_s3_oplog(
self,
source_cluster_id: str = None,
shard: str = None,
cloud_storage_source_bucket: str = None,
cloud_storage_source_path: str = None,
dryrun: bool = False,
) -> None:
"""
Fix S3 operations log.
"""
if not self._context.config.get("cloud_storage"):
return

fix_s3_oplog(
self._context.config["cloud_storage"],
source_cluster_id
if source_cluster_id
else self._context.config["restore_from"]["cid"],
shard if shard else self._context.config["restore_from"]["shard_name"],
cloud_storage_source_bucket,
cloud_storage_source_path,
dryrun,
)

def delete(
self, backup_name: str, purge_partial: bool
) -> Tuple[Optional[str], Optional[str]]:
Expand Down
33 changes: 0 additions & 33 deletions ch_backup/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,39 +703,6 @@ def restore_command(
)


@command(name="fix-s3-oplog")
@option(
"--cloud-storage-source-bucket",
type=str,
help="Source bucket name to restore cloud storage data.",
)
@option(
"--cloud-storage-source-path",
type=str,
help="Source path to restore cloud storage data.",
)
@option("--source-cluster-id", type=str, help="Source cluster ID.")
@option("--shard", type=str, default="shard1", help="Shard name.")
@option("--dryrun", is_flag=True, default=False, help="Do not perform any actions.")
def fix_s3_oplog_command(
_ctx: Context,
ch_backup: ClickhouseBackup,
cloud_storage_source_bucket: str = None,
cloud_storage_source_path: str = None,
source_cluster_id: str = None,
shard: str = "shard1",
dryrun: bool = False,
) -> None:
"""Fix S3 operations log."""
ch_backup.fix_s3_oplog(
source_cluster_id,
shard,
cloud_storage_source_bucket,
cloud_storage_source_path,
dryrun,
)


@command(name="restore-access-control") # type: ignore
@argument("name", metavar="BACKUP")
def restore_access_control_command(
Expand Down
109 changes: 0 additions & 109 deletions ch_backup/logic/cloud_storage_utils.py

This file was deleted.

0 comments on commit 3440923

Please sign in to comment.