Files
cozystack/internal
Alexey Artamonov b62f2f385f fix(clickhouse): record the bucket setting a ClickHouse backup was taken with
A ClickHouse application writes its archives either to the system
bucket, which nothing prunes, or to its own bucket, whose lifecycle is
the tenant's. A Backup did not say which applied, so nothing deciding
the fate of the archive when the Backup goes could tell them apart.

The application's useSystemBucket is read when the backup Job is
created, stamped on the Job and copied onto the Backup from there,
because the application may switch before the controller sees the Job
complete. It is the setting, not an observation of the bucket: the
sidecar uploads to the bucket it was last restarted with, so a switch
made just before the backup can be recorded while the sidecar still
writes to the previous bucket. A Job created before the stamp existed
falls back to the application as it reads then.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
2026-11-23 12:15:04 +03:00
..