Created
March 4, 2022 04:15
-
-
Save AntiKnot/14f569d93aa1d17f5ab1da28d0e20cd1 to your computer and use it in GitHub Desktop.
how to backup clickhouse database table
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
| clickhouse client --host 127.0.0.1 --port 9000 --query="select * from DatabaseName.TableName1 FORMAT CSV" > /opt/clickhouse/backup/DatabaseName.TableName1.csv | |
| clickhouse client --host 127.0.0.1 --port 9000 --query="select * from DatabaseName.TableName2 FORMAT CSV" > /opt/clickhouse/backup/DatabaseName.TableName2.csv | |
| clickhouse client --host 127.0.0.1 --port 9000 --query="select * from DataBaseName.TableName3 FORMAT CSV" > /opt/clickhouse/backup/DataBaseName.TableName3.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment