ClickHouse / ClickHouse/ClickHouse
Azure Disk backup storage does not save blob with given filename or path
- Dominant language
- C++
- Stars
- 49.9k
- Forks
- 9k
- Avg merge
- 21h 32m
- Merged PRs (30d)
- 515
Description
### Company or project name
We host a database for historical analyses.
### Describe the unexpected behaviour
We have defined an Azure blobstorage account container as a disk in our clickhouse cluster. Creating backups and restoring from them is working properly but I cannot seem to make the BACKUP command save into a blob with a name I specified or to some path that is specified. If a path is provided it disregards it alltogether and saves the backup to the toplevel of the container. If a filename is provided it saves it to a single file with a random filename.
### How to reproduce
Current Clickhouse version: 24.12.3.47
We define the backup storage disk through the config xml files so:
```xml
/data/tmp/
/data/clickhouse/
azure_blob_storage
https://xxx.blob.core.windows.net
clickhouse-storage
xxx
xxx
/data/clickhouse/disks/blob_storage_disk/
/data/clickhouse/disks/blob_storage_disk/cache/
false
azure_blob_storage
https://xxx.blob.core.windows.net
clickhouse-backup
yyy
xxx
/data/clickhouse/disks/blob_storage_backup/
/data/clickhouse/disks/blob_storage_backup/cache/
false
default
blob_storage_disk
blob_storage_backup
```
```SQL
BACKUP DATABASE example TO Disk('blob_storage_backup', 'clickhouse-backup/test_first_backup.zip');
```
This creates a blob object with a random name like `ccevzucqconnqsjtrvrgubasmcpeq` instead of the expected `test_first_backup.zip`
Similar when telling the operator to save to a path like so:
```SQL
BACKUP DATABASE example TO Disk('blob_storage_backup', 'clickhouse-backup/base_backup/');
```
It saves a lot of files with random filenames to the top level of the storage container, instead of saving it into a subfolder.
### Expected behavior
1. When we create a backup of the database and supply the path we expect the files to end up in that folder on the container
2. When we create a backup of the database and supply a filename we expect a single file as a backup with the filename that was supplied.
### Error message and/or stacktrace
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.