The command clickhouse-backup create provides no metadata folder and an empty shadow folder

风流意气都作罢 提交于 2021-01-27 13:27:19

问题


I have a clickhouse database called "clickhouse_database" and a table called "actions" which has some data in it which I want to take a backup of.

Running the command "sudo clickhouse-backup create" gives me this response:

c/camel/source/project/clickhouse-backup$ sudo clickhouse-backup create
2021/01/08 00:27:09 Create backup '2021-01-07T23-27-09'
2021/01/08 00:27:09 Freeze `clickhouse_database`.`actions`
2021/01/08 00:27:09 Skip `system`.`asynchronous_metric_log`
2021/01/08 00:27:09 Skip `system`.`metric_log`
2021/01/08 00:27:09 Skip `system`.`part_log`
2021/01/08 00:27:09 Skip `system`.`query_log`
2021/01/08 00:27:09 Skip `system`.`trace_log`
2021/01/08 00:27:09 Copy metadata
2021/01/08 00:27:09   Done.
2021/01/08 00:27:09 Move shadow
2021/01/08 00:27:09 open /var/lib/clickhouse/shadow: no such file or directory

I can see that in the backup directory "/var/lib/clickhouse/backup" is created with a timestamp as name which is expected:

$ ls
2021-01-06T19-04-12  2021-01-07T23-24-24  2021-01-07T23-27-09

Inside one of these directories I'd expect that there is a shadow and a metadata directory but what I see is that there's only a shadow directory which is empty:

/2021-01-07T23-27-09$ ls
shadow

What am I missing here?

Note:

I'm using this as a guide to use the clickhouse-backup tool: https://altinity.com/blog/introduction-to-clickhouse-backups-and-clickhouse-backup


回答1:


You need to be located inside the given pod before

clickhouse-backup create

will work.

You can get a shell into the pod with the command

kubectl exec --stdin --tty <podname> -- /bin/bash


来源:https://stackoverflow.com/questions/65629318/the-command-clickhouse-backup-create-provides-no-metadata-folder-and-an-empty-sh

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!