You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
download of a regular backup fails with "Chown backup disk" when embedded_backup_disk is configured #1653
clickhouse:
use_embedded_backup_restore: trueembedded_backup_disk: backups_s3 # disk of type s3 declared in the server config
Steps
Create backups with use_embedded_backup_restore: false (regular backups, tag regular in list remote).
Switch the config to use_embedded_backup_restore: true with an embedded_backup_disk.
clickhouse-backup download <regular backup>
Expected
The download works: the mode is picked from the tags of the backup (b.isEmbedded = strings.Contains(remoteBackup.Tags, "embedded")), so a regular backup should be downloaded as before.
Actual
The data is downloaded, then the command fails:
FTL cmd/clickhouse-backup/main.go:1414 > , error=Chown backup disk: lstat /var/lib/clickhouse/disks/backups_s3/full_monitoring_monitoring_20261025: no such file or directory
stack:
github.com/Altinity/clickhouse-backup/v2/pkg/backup.(*Backuper).downloadEpilogue()
github.com/Altinity/clickhouse-backup/v2/pkg/backup/download.go:430
github.com/Altinity/clickhouse-backup/v2/pkg/backup.(*Backuper).Download()
Cause
In downloadEpilogue (pkg/backup/download.go), the loop that chowns <backup disk path>/<backup name> for every disk with IsBackup runs whatever the kind of the backup.
For a regular backup nothing is written on the backup disk, so the directory does not exist and Chown fails.
The block just above, which downloads the .backup file, is guarded by b.isEmbedded && b.cfg.ClickHouse.EmbeddedBackupDisk != "": the chown loop probably needs the same guard.
Workaround
Download and restore a regular backup with CLICKHOUSE_USE_EMBEDDED_BACKUP_RESTORE=false CLICKHOUSE_EMBEDDED_BACKUP_DISK="".
backups_s3 is declared in config.d as a disk of type s3, in the same bucket as the remote storage of clickhouse-backup.
Thanks for #1654, it matches what we see: with the guard on b.isEmbedded, our workaround for regular backups (CLICKHOUSE_USE_EMBEDDED_BACKUP_RESTORE=false CLICKHOUSE_EMBEDDED_BACKUP_DISK="") should no longer be needed.
Activity
Slach commentedon Oct 29, 2026
could you share
SELECT * FROM system.disk?louisantoinem commentedon Oct 29, 2026
Sure, here it is (ClickHouse 26.8.2.7, clickhouse-backup 2.8.2):
backups_s3is declared inconfig.das a disk of types3, in the same bucket as the remote storage of clickhouse-backup.Thanks for #1654, it matches what we see: with the guard on
b.isEmbedded, our workaround for regular backups (CLICKHOUSE_USE_EMBEDDED_BACKUP_RESTORE=false CLICKHOUSE_EMBEDDED_BACKUP_DISK="") should no longer be needed.prepare ChangeLog.md for v2.8.3
download: skip chown of embedded_backup_disk for regular backups