Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support BACKUP ALL command #48189

Merged
merged 2 commits into from
Apr 3, 2023
Merged

Conversation

vitlibar
Copy link
Member

Changelog category:

  • Improvement

Changelog entry:

Added support for BACKUP ALL command which backups all tables and databases, including temporary and system ones.

@robot-clickhouse robot-clickhouse added the pr-improvement Pull request with some product improvements label Mar 29, 2023
@nikitamikhaylov nikitamikhaylov self-assigned this Mar 29, 2023
@nikitamikhaylov
Copy link
Member

nikitamikhaylov commented Mar 30, 2023

@vitlibar This is something we have to address

E           Exception: ClickHouse HTTP server returned 500 Internal Server Error: Code: 608. DB::Exception: Cannot restore the table system.asynchronous_metric_log because it already contains some data. You can set structure_only=true or allow_non_empty_tables=true to overcome that in the way you want: While restoring data of table system.asynchronous_metric_log. (CANNOT_RESTORE_TABLE) (version 23.3.1.1)

Because almost all tables with _log suffix will always contain some data even on a fresh instance.

@vitlibar
Copy link
Member Author

vitlibar commented Mar 30, 2023

Because almost all tables with _log suffix will always contain some data even on a fresh instance.

I can set allow_non_empty_tables=true for that test to make RESTORE just merge the contents of those tables (that will cause row duplication in those log tables, but I think it's ok for the test).

Or as an alternative way I can exclude those tables from the backup with

BACKUP ALL EXCEPT TABLE system.asynchronous_metric_log, ...

I think both ways are worth to be tested

@alexey-milovidov alexey-milovidov merged commit de8f7a5 into ClickHouse:master Apr 3, 2023
@vitlibar vitlibar deleted the backup-all branch April 4, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-improvement Pull request with some product improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants