Skip to content

Add create-tables and improve restore process#4

Closed
anuriq wants to merge 4 commits intoAltinity:masterfrom
anuriq:master
Closed

Add create-tables and improve restore process#4
anuriq wants to merge 4 commits intoAltinity:masterfrom
anuriq:master

Conversation

@anuriq
Copy link
Copy Markdown
Contributor

@anuriq anuriq commented Feb 27, 2019

  • add create-tables command implementation

when restoring to fresh installation of Clickhouse a step to recreate databases and tables had to be done manually. now create-tables method takes metadata information stored with backup and recreates all objects including distributed tables (they are created last). tables should not exist before running this command.

  • change convert partition method to support custom partitioning key

convertPartition was expecting one of two:
- legacy partitioning key toYYYYMM(date_column)
- partitioning key based on data YYYY-MM-DD

as cited in documentation https://clickhouse.yandex/docs/en/operations/table_engines/custom_partitioning_key/ name of partition same as in system.parts table can be used. this is also same as used in file name. this means just that part itself may be used in ATTACH PARTITION query.

  • make partition size for S3 object configurable

there was a hard coded value equal to 5 MB. this is saved as default value, but now it may be changed via configuration file.

  • add documentation comments and fix some comments. no code changes

there was a hard coded value equal to 5 MB. this is saved as default
value, but now it may be changed via configuration file.
convertPartition was expecting one of two:
- legacy partitioning key toYYYYMM(date_column)
- partitioning key based on data YYYY-MM-DD

as cited in documentation https://clickhouse.yandex/docs/en/operations/table_engines/custom_partitioning_key/
name of partition same as in system.parts table can be used. this is
also same as used in file name. this means just that part itself may be
used in ATTACH PARTITION query.
when restoring to fresh installation of Clickhouse a step to recreate
databases and tables had to be done manually. now create-tables method
takes metadata information stored with backup and recreates all objects
including distributed tables (they are created last). tables should not
exist before running this command.
@anuriq
Copy link
Copy Markdown
Contributor Author

anuriq commented Mar 3, 2019

going to add code and recreate PR

@anuriq anuriq closed this Mar 3, 2019
CaptTofu pushed a commit to CaptTofu/clickhouse-backup that referenced this pull request Nov 29, 2024
luong-komorebi pushed a commit to luong-komorebi/clickhouse-backup that referenced this pull request Sep 9, 2025
…ltinity#4)

* import chart from @duyet

* Fixes for clustered mode

- RunAsUser 101 to match the user the clickhouse process runs as inside
  the container
- Remove option to use an exsiting PVC
- Fix location of <path> config option

* update readme to reflect values changes

* Lock version, start with 1 replica

* wip values file for clickhouse

* wip renders chits

* first pass on chi.yaml wip

* test chi

* doh

* remove deps

* working work in progress with exmaples

* fix credential name

* allow specific keeper hostname

* add a nice message on installation

* wip replicas in zones

* update notes

* remove examples; use aliases for subcharts

* fix aliases

* reorganize values under clickhouse key

* fix empty keeper bug

* Fix examples and antiaffinity

* update notes with port forward

* enforce keeper settings

* adds values spec to validate values

* default user is always default

* Remove extra line in script

* rename keeper to prepare for CRD

* update docs

---------

Co-authored-by: Robert Hodges <rhodges@altinity.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant