Closed resuni closed 2 years ago
which clickhouse-backup -version
do you use?
could you share results of the following command S3_FORCE_PATH_STYLE=true clickhouse-backup list remote -c your_config.yml
?
I downloaded the latest 1.0.0 RPM from the releases page.
Version: 1.0.0
Git Commit: 37f3bd78adec2aadc1de10f9323fe426a5e12dc4
Build Date: 2021-06-16
S3_FORCE_PATH_STYLE=true clickhouse-backup list remote -c /etc/clickhouse-backup/config.yml
returns nothing. I ran create_remote
again to be sure, and still nothing.
@resuni could you try run docker?
docker run --rm -e S3_DEBUG=true -v /etc/clickhouse-backup/config.yml:/etc/clickhouse-backup/config.yml altinity/clickhouse-backup:master create_remote test_backup
docker run --rm -e S3_DEBUG=true -v /etc/clickhouse-backup/config.yml:/etc/clickhouse-backup/config.yml altinity/clickhouse-backup:master list remote
if not, I attach binary which supports S3_DEBUG
clickhouse-backup.zip
unpack it and run
S3_DEBUG=true clickhouse-backup list remote -c /etc/clickhouse-backup/config.yml
and share the results
I opted to use the binary in your attached zip, since I don't have Docker installed on this machine. I've redacted the Host, Authorization, and X-Amz-Content-Sha256 headers. Let me know if you think there may be something in those headers that you need.
# S3_DEBUG=true ./clickhouse-backup list remote -c /etc/clickhouse-backup/config.yml
2021/08/06 16:13:19 info DEBUG: Request s3/ListObjectsV2 Details:
---[ REQUEST POST-SIGN ]-----------------------------
GET /?delimiter=%!F(MISSING)&list-type=2&max-keys=1000&prefix=%!F(MISSING)dev%!F(MISSING) HTTP/1.1
Host: REDACTED
User-Agent: aws-sdk-go/1.37.15 (go1.16.6; linux; amd64)
Authorization: REDACTED
X-Amz-Content-Sha256: REDACTED
X-Amz-Date: 20210806T161319Z
Accept-Encoding: gzip
-----------------------------------------------------
2021/08/06 16:13:19 info DEBUG: Response s3/ListObjectsV2 Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Content-Length: 277
Connection: keep-alive
Content-Type: application/xml
Date: Fri, 06 Aug 2021 16:13:21 GMT
Server: StorageGRID/11.4.0.2
X-Amz-Id-2: 12133881
X-Amz-Request-Id: 1628266335752929
-----------------------------------------------------
I figured it out. In my clickhouse-backup config.yml, I specified the path with a leading slash. For whatever reason, uploading backups worked just fine with this configuration, but reading from the S3 storage did not. Once I removed the leading slash from the path, everything started working as expected.
@AlexAkulov look like we can clouse issue?
Close issue due inactivity
I am looking at using clickhouse-backup to back up our ClickHouse 18.16.1 cluster to S3-compatible non-Amazon storage.
clickhouse-backup create_backup
runs without error, and I can confirm the backup exists on our S3-compatible storage using s3cmd. However, when I runclickhouse-backup list
, only the local backup appears in the list. Furthermore, thedelete
andrestore
commands will return an error when attempting to delete or restore a remote backup.In order to troubleshoot this, I've set the log level to "debug", but nothing in the debug messages appears to indicate anything is wrong when running the
create_backup
command. How do I go about troubleshooting this?My config: