mkdir -p /opt/clikchouse-backup-diff/
git clone https://gist.github.com/d6390005975b9643344e9ee935fa882a /opt/clikchouse-backup-diff/
chmod +x /opt/clikchouse-backup-diff/*.sh
cp -fv /opt/clikchouse-backup-diff/cron_example.txt /etc/cron.d/clickhouse_backup_diff
cp -fv /opt/clikchouse-backup-diff/clickhouse-backup-config-example.yml /etc/clickhouse-backup/config.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <yandex> | |
| <default><access_management>1</access_management></default> | |
| </yandex> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| backup_date=$(date +%Y-%m-%d-%H-%M-%S) | |
| table_patterns=$1 # for example table_patterns="ns_v2.t_agg_page_h0?_local" | |
| backup_name="full-$backup_date" | |
| backup_command="create_remote --tables=$table_patterns $backup_name" | |
| echo "RUN ${backup_command}" | |
| echo "{\"command\":\"${backup_command}\"}" | curl -XPOST "http://localhost:7171/backup/actions" --data-binary=@- | |
| while [[ "0" == $(curl -s "http://localhost:7171/backup/status" | grep -F "${backup_command}" | grep -c "success|error") ]]; do | |
| printf "." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ( | |
| "context" | |
| "fmt" | |
| "io" | |
| "net/http" | |
| "path" | |
| "strings" | |
| "time" | |
| "cloud.google.com/go/storage" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM yandex/clickhouse-server:${CLICKHOUSE_VERSION:-latest} | |
| USER root | |
| ARG UBUNTU_NAME=focal | |
| ARG UBUNTU_VERSION=20.04 | |
| RUN echo "Begin ODBC install" && \ | |
| #MySQL repo | |
| wget -qO- "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xa4a9406876fcbd3c456770c88c718d3b5072e1f5" | apt-key add - && \ | |
| echo "deb http://repo.mysql.com/apt/ubuntu/ ${UBUNTU_NAME} mysql-8.0" >/etc/apt/sources.list.d/mysql-oracle.list && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| services: | |
| clickhouse: | |
| image: yandex/clickhouse-server:${CLICKHOUSE_VERSION:-latest} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| services: | |
| mysql8: | |
| image: mysql:${MYSQL_VERSION:-latest} | |
| environment: | |
| - MYSQL_ALLOW_EMPTY_PASSWORD=1 | |
| volumes: | |
| - ./mysql8_table.sql:/docker-entrypoint-initdb.d/mysql8_table.sql | |
| - ./mysql8_log_queries.conf:/etc/mysql/conf.d/mysql8_log_queries.conf | |
| clickhouse: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| superset/ | |
| superset/clickhouse/ | |
| .idea/ |
This file has been truncated, but you can view the full file.