-
Hi, I have a difficulty understanding the documentation related to backup/restore on Kubernetes. In the base example of doing backup/restore the tool is used by invoking... the tool itself: shard_number=$(clickhouse-client -q "SELECT getMacro('shard')")
clickhouse-backup create_remote shard${shard_number}-backup
clickhouse-backup delete local shard${shard_number}-backup while a few pages below, there is an example of a k8s cron job that actually does the clickhouse-client --echo -mn -q "INSERT INTO system.backup_actions(command) VALUES('create ${SERVER}-${BACKUP_NAMES[$SERVER]}')" --host="$SERVER" --port="$CLICKHOUSE_PORT" --user="$BACKUP_USER" $BACKUP_PASSWORD; Is this just a leftover in readme or is there some particular reasoning why the tool cannot be run in cron job? Could you provide some context on that? It would help a lot. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
In kubernetes we use
So I would like to recommend use And clickhouse-backup REST API for containerized installations |
Beta Was this translation helpful? Give feedback.
In kubernetes we use
clickhouse-operator
which deployclickhouse-backup
as container inside the Pod where already presentclickhouse-server
and executeclickhouse-backup server
in REST API mode, which create engine=url() tables insideclickhouse-server
CronJob
executes outside Pods withclickhouse-server + clickhouse-backup
, and execute the same command via SQL queriesSo I would like to recommend use
clickhouse-backup
cli interface for stanalone installationsAnd clickhouse-backup REST API for containerized installations