-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backup not working using azblob with use_embedded_backup_restore flag as true #1031
Comments
Clickhouse Version: 24.8.4.13 |
Hi @Slach , I was locking at the changes. This should be azblobBackupURL.Host = b.cfg.AzureBlob.AccountName + ".blob." + b.cfg.AzureBlob.EndpointSuffix instead correct? I tried to run with BlobEndpoint=https://myaccount.core.windows.net and didn't work.. |
@hermeswaldemarin thanks for reporting, now should works |
It's working now @Slach . I did the tests with the "altinity/clickhouse-backup:master" image. Just to organize myself here, when will the release 2.6.3 be released? |
i can't provide any ETA look to https://github.com/Altinity/clickhouse-backup/milestone/74 |
The backup for azure is not working like expected when using the use_embedded_backup_restore: true.
This is the env variable I'm using.
AZBLOB_ACCOUNT_NAME=myaccount
AZBLOB_ENDPOINT_SUFFIX=core.windows.net
AZBLOB_ACCOUNT_KEY=my_access_key
AZBLOB_CONTAINER=my-backup-bucket
In this method, used by clickhouse-backup to access the container, the BlobEndpoint is constructed correctly
azblob.go#L94
But when it sends the backup command to clickhouse the BlobEndpoint constructed is different and we receive an error by clickhouse in the command.
backuper.go#L352
This is how the command is created to send to clickhouse.
BACKUP TABLE
myschema.
json_layoutsTO AzureBlobStorage('DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=my_access_key;BlobEndpoint=https://core.windows.net/myaccount;','my-backup-bucket','/chi-clickhouse-clickhouse-0-1-full-2024-10-22-15-48-46/') SETTINGS allow_azure_native_copy=1
the Blob endpoint is wrong, should be BlobEndpoint=https://myaccount.blob.core.windows.net; instead.
BACKUP TABLE myschema.json_layouts TO AzureBlobStorage('DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=my_access_key;BlobEndpoint=https://myaccount.blob.core.windows.net;', 'my-backup-bucket', '/chi-clickhouse-clickhouse-0-1-full-2024-10-22-15-48-46/') SETTINGS allow_azure_native_copy = 1
I also tried omitting the BlobEndpoint in the config and it also works. This command bellow also works...
BACKUP TABLE myschema.json_layouts TO AzureBlobStorage('DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=my_access_key', 'my-backup-bucket', '/chi-clickhouse-clickhouse-0-1-full-2024-10-22-15-48-46/') SETTINGS allow_azure_native_copy = 1
The text was updated successfully, but these errors were encountered: