I want to create a backup of my clickhouse database. I'm following the guide here.
As recommended in the guide I'm using the official tiny docker image for clickhouse-backup. When running for instance:
$ clickhouse-backup tables
I'll receive this response:
can't connect to clickouse with: dial tcp 127.0.0.1:9000: connect: connection refused
Which is why I want to overwrite the default configuration because the port is different. It says in the guide that it is possible via environment variables to overwrite the default options. So I created a script like this:
#!/bin/bash
export CLICKHOUSE_PORT=8123
But this doesn't change the response for command "$ clickhouse-backup tables".
Am I setting the env variable wrong or is there something else I can do to alter the default config?
The default config looks like this:
johnnylord:/c/DevTools/source/project/clickhouse-backup$ clickhouse-backup default-config
general:
remote_storage: s3
disable_progress_bar: false
backups_to_keep_local: 0
backups_to_keep_remote: 0
clickhouse:
username: default
password: ""
host: localhost
port: 9000
data_path: ""
skip_tables:
- system.*
timeout: 5m
freeze_by_part: false
s3:
access_key: ""
secret_key: ""
bucket: ""
endpoint: ""
region: us-east-1
acl: private
force_path_style: false
path: ""
disable_ssl: false
part_size: 104857600
compression_level: 1
compression_format: gzip
sse: ""
disable_cert_verification: false
gcs:
credentials_file: ""
credentials_json: ""
bucket: ""
path: ""
compression_level: 1
compression_format: gzip
cos:
url: ""
timeout: 2m
secret_id: ""
secret_key: ""
path: ""
compression_format: gzip
compression_level: 1
debug: false