From 4a77050ca6c5d9cf5585d32917af900e1d15c1a5 Mon Sep 17 00:00:00 2001 From: Daesgar Date: Fri, 12 Jul 2024 15:32:31 +0200 Subject: [PATCH] chore: allow sharded database backups as well (#74) --- 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(