Skip to main content
Version: 0.3.x

Cluster Upgrade and Downgrade

Upgrading Clusters Based on S3 Storage (Applicable Only to Versions Before 0.2.0)

After the preview version of S3 (from pre-0.2.0 to 0.2.0), some S3 object keys and S3 metadata have changed. We provide tools to migrate from older versions. Use these tools only if you are using an older version of ByConity (before version 0.2.0) and storing data in S3. Follow these steps:

  1. Stop the ByConity cluster.
# stop the cluster
  1. Use the provided tool to migrate S3 data.
  • If you are running ByConity using docker, you can log in to the server/worker node and use the ps command to find the clickhouse binary file.
./clickhouse s3-rename --s3_ak_id ${S3_AK_ID} --s3_ak_secret ${S3_AK_SECRET} --from_bucket ${BYCONITY_S3_BUCKET} --s3_endpoint ${S3_ENDPOINT} --s3_region ${S3_REGION} --root_prefix ${BYCONTIY_DATA_PREFIX}
  • If you are running ByConity using a docker wrapper:
docker run -it --rm --network host --name byconity-s3-sanitizer byconity/byconity:0.2.0 clickhouse s3-rename --s3_ak_id ${S3_AK_ID} --s3_ak_secret ${S3_AK_SECRET} --from_bucket ${BYCONITY_S3_BUCKET} --s3_endpoint ${S3_ENDPOINT} --s3_region ${S3_REGION} --root_prefix ${BYCONTIY_DATA_PREFIX}
tool argumentsexplanation
s3_ak_idS3 access key ID used by byconity
s3_ak_secretS3 secret access key used by byconity
s3_regionS3 region used by byconity
s3_endpointS3 endpoint used by byconity
from_bucketS3 bucket name used by byconity
root_prefixS3 object prefix used by byconity
thread_numberNumber of threads to use (default is 1)
need_deleteWhether to delete the original file (default is true)
uuid_checkWhether to check if the UUID is valid (default is true)
enable_loggingWhether to enable logging output
logging_levelLogging level (default is debug output)
  1. Use the provided tool to migrate S3 metadata.
  • If you know the location of the clickhouse binary file:
./clickhouse s3-meta-sanitizer -C cnch_config.xml
  • If you are running ByConity using a docker wrapper:
docker run -it --rm --network host --name byconity-s3-sanitizer byconity/byconity:0.2.0 clickhouse s3-meta-sanitizer --config-file /root/app/config/cnch_config.xml
tool argumentsexplanation
CSpecify the config file from the cnch_config configuration field in your ByConity server configuration file.
  1. Restart the ByConity cluster.
# restart the cluster