Skip to content
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

Can't backup clickhouse db which in kubernetes #47

Closed
cool-tiger opened this issue Sep 26, 2019 · 4 comments
Closed

Can't backup clickhouse db which in kubernetes #47

cool-tiger opened this issue Sep 26, 2019 · 4 comments

Comments

@cool-tiger
Copy link

I try to make backup database, which work in docker container from official yandex image. This docker image runs in kubernetes cluster. I made separate pod with docker image alexakulov/clickhouse-backup and tried to make backup. And i had this error when i started this util:

2019/09/26 11:08:49 envconfig.Process: assigning CLICKHOUSE_CLICKHOUSE_PORT to Port: converting 'tcp://192.168.186.165:9000' to type uint. details: strconv.ParseUint: parsing "tcp://192.168.186.165:9000": invalid syntax

My config:
clickhouse:
  username: default
  password: ""
  host: clickhouse #this is address of host with clickhouse server db
  port: 9000
  data_path: ""
  skip_tables:
  - system.*
s3:
  access_key: ""
  secret_key: ""
  bucket: ""
  endpoint: ""
  region: us-east-1
  acl: private
  force_path_style: false
  path: ""
  disable_ssl: false
  disable_progress_bar: false
  part_size: 104857600
  strategy: ""
  backups_to_keep_local: 0
  backups_to_keep_s3: 0
  compression_level: 1
  compression_format: lz4

run this command:
clickhouse-backup create my_backup

@AlexAkulov
Copy link
Collaborator

AlexAkulov commented Sep 26, 2019

Hello!
CLICKHOUSE_CLICKHOUSE_PORT is defined as "tcp://192.168.186.165:9000" it's wrong.
If you want to use "tcp://192.168.186.165:9000" for connecting to clickhouse you must define CLICKHOUSE_HOST="192.168.186.165" and CLICKHOUSE_PORT=9000 (by default)

@cool-tiger
Copy link
Author

Thank you, it's work. Perphap variable CLICKHOUSE_HOST are wrong define in container.

@fzyzcjy
Copy link

fzyzcjy commented Jan 8, 2021

By the way I also see that. I do not define that variable manually, so what should I do?

@fzyzcjy
Copy link

fzyzcjy commented Jan 8, 2021

OK I see the reason: It seems to be injected by kubernetes automatically along with many other variables. Thus defining it manually works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants