Skip to content

Commit

Permalink
chore: allow sharded database backups as well (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daesgar authored Jul 12, 2024
1 parent 93a182a commit 4a77050
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion housewatch/clickhouse/backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
)


Expand All @@ -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(
Expand Down

0 comments on commit 4a77050

Please sign in to comment.