From 9464737c814579e9c60ba3969168154d79c0ab13 Mon Sep 17 00:00:00 2001 From: Daniel Escribano Date: Fri, 12 Jul 2024 15:28:46 +0200 Subject: [PATCH] chore: allow sharded database backups as well --- housewatch/clickhouse/backups.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/housewatch/clickhouse/backups.py b/housewatch/clickhouse/backups.py index 1f95b85..8b089a3 100644 --- a/housewatch/clickhouse/backups.py +++ b/housewatch/clickhouse/backups.py @@ -119,7 +119,7 @@ def create_table_backup( ) -def create_database_backup(database, bucket, path, aws_key=None, aws_secret=None, base_backup=None, cluster="default"): +def create_database_backup(database, bucket, path, aws_key=None, aws_secret=None, base_backup=None, cluster="default", is_sharded=False): if aws_key is None or aws_secret is None: aws_key = settings.AWS_ACCESS_KEY_ID aws_secret = settings.AWS_SECRET_ACCESS_KEY @@ -139,6 +139,7 @@ def create_database_backup(database, bucket, path, aws_key=None, aws_secret=None aws_key=aws_key, aws_secret=aws_secret, base_backup=base_backup, + is_sharded=is_sharded, ) @@ -163,6 +164,7 @@ def run_backup(backup_id, incremental=False): aws_secret=backup.aws_secret_access_key, cluster=backup.cluster, base_backup=base_backup, + is_sharded=backup.is_sharded, ) elif backup.is_table_backup(): create_table_backup(