Altinity / clickhouse-backup

Tool for easy backup and restore for ClickHouse® using object storage for backup files.
https://altinity.com
Other
1.25k stars 225 forks source link

Add `backup_tables` into config, to allow similar behavior with `--table` CLI parameter #330

Closed vanyasvl closed 2 years ago

vanyasvl commented 2 years ago

Now config has only skip_tables option to exclude tables form back. It'll be very useful to have bakup_tables option with of tables to backup in case we have many databases and tables and needs to backup only few.

Slach commented 2 years ago

If I understood correctly, we already implement

clickhouse-backup create --tables=*.table_name1,another_pattern
vanyasvl commented 2 years ago

If I understood correctly, we already implement

clickhouse-backup create --tables=*.table_name1,another_pattern

Yes, but it's implemented via command line only, not via config. For example we have same typical backup script and different configs for the installations.

Slach commented 2 years ago

use case is not clear why you can't use --table parameter in your backup script?

what is the difference from your side, between:

clickhouse-backup -c config1.yml create <backup>
clickhouse-backup -c config2.yml create <backup>
clickhouse-backup -c config3.yml create <backup>

and

clickhouse-backup -c config.yml create <backup> --table=pattern1
clickhouse-backup -c config.yml create <backup> --table=pattern2
clickhouse-backup -c config.yml create <backup> --table=pattern3
AngelLittleChaochao commented 2 years ago

Which version supports this feature now? backup_table.

AngelLittleChaochao commented 2 years ago

And if I use the API version, can I send one http request to backup table A, another http request to backup table B?

Slach commented 2 years ago

i tried to plan to 2.0.0 (not released yer) @AngelLittleChaochao could you clear your use case?

Why you can't use table parameter for POST /backup/actions or POST /backup/create API calls? Did you read https://github.com/AlexAkulov/clickhouse-backup#api ?

AngelLittleChaochao commented 2 years ago

i tried to plan to 2.0.0 (not released yer) @AngelLittleChaochao could you clear your use case?

Why you can't use table parameter for POST /backup/actions or POST /backup/create API calls? Did you read https://github.com/AlexAkulov/clickhouse-backup#api ?

Thanks Slach for your response and reference link. It solved my problem.

Slach commented 2 years ago

Let's close issue because @vanyasvl doesn't provide more context