Commit Graph

90 Commits

Author SHA1 Message Date
Vitaly Baranov
160bc288d3 Fix implementation of totalBytes() & totalRows() for Log family. 2022-05-04 00:15:21 +02:00
Vitaly Baranov
202dd864ed Fix compilation. 2022-05-03 18:34:29 +02:00
Vitaly Baranov
484c2c9c4a Use SYSTEM SYNC DATABASE REPLICA to make code better. 2022-05-03 16:59:41 +02:00
Vitaly Baranov
828f45f078 Add new restore setting 'allow_non_empty_tables'. 2022-05-03 16:18:45 +02:00
Vitaly Baranov
cb9d867f5f Fix restore coordination for creating tables in replicated databases. 2022-05-03 11:03:16 +02:00
Vitaly Baranov
5257ce31f8 Improved using ThreadPool for making backup or restoring, changed columns in system.backups. 2022-05-03 11:03:13 +02:00
Vitaly Baranov
409edfd3fa Rework RestoreCoordination: make restore deterministic. 2022-05-03 11:01:44 +02:00
Vitaly Baranov
2c754f44fc Make calculation of shard_num & replica_num not dependant on match of the cluster's definitions on nodes. 2022-05-03 11:01:44 +02:00
Vitaly Baranov
b1295311c9 Fix crash when BACKUP & RESTORE are called without ON CLUSTER for replicated DB. 2022-05-03 11:01:44 +02:00
Vitaly Baranov
2a645bb187 Fix sending 'create_table' and 'create_database' restore settings to cluster. 2022-05-03 11:01:44 +02:00
Vitaly Baranov
bddec55d35 Added ASTBackupQuery::setDatabase(). 2022-05-03 11:01:44 +02:00
Amos Bird
9d30be2c59
Fix build again 2022-04-29 14:45:27 +08:00
Vitaly Baranov
a8e924caf6 Make BACKUP & RESTORE synchronous by default. 2022-04-26 18:45:39 +02:00
Vitaly Baranov
eb1917f9de Use sequential nodes for counters. Add comments. 2022-04-26 18:45:35 +02:00
Vitaly Baranov
a89ef54c69 Fix tests and compilation. 2022-04-26 13:32:23 +02:00
Vitaly Baranov
16f8c71eb4 Disable usage of archives with backups on clusters. 2022-04-26 10:13:49 +02:00
Vitaly Baranov
1c0b731ea6 Fix compilation. 2022-04-26 10:13:08 +02:00
Vitaly Baranov
78bcb96098 Rename backup & restore setting 'async' -> 'sync', and make backup & restore async by default. 2022-04-26 09:51:19 +02:00
Vitaly Baranov
000b184691 Fix style & compilation. 2022-04-25 23:05:35 +02:00
Vitaly Baranov
5127eeee7b Remove debug sleep. 2022-04-25 17:11:19 +02:00
Vitaly Baranov
ed0af9d4a0 Improve shutdown with async backup/restore. 2022-04-25 16:34:34 +02:00
Vitaly Baranov
97cd68239f Change represenation of shards inside backup. 2022-04-25 16:34:34 +02:00
Vitaly Baranov
042dc4abb2 Rename settings shard -> shard_num, replica -> replica_num. 2022-04-25 16:34:34 +02:00
Vitaly Baranov
129eca7307 CREATE queries generated by RESTORE command is now considered as internal. 2022-04-25 16:34:34 +02:00
Vitaly Baranov
68a020ecea Implement BACKUP/RESTORE ON CLUSTER. 2022-04-25 16:34:33 +02:00
Vitaly Baranov
144d3aefeb Add system table system.backups; implement async mode for commands BACKUP & RESTORE 2022-04-25 16:34:33 +02:00
Vitaly Baranov
ec5b89a6ac Revert backup version 2. Add parameter data_file_path to handle duplicate files more easily without introducing a new backup format. 2022-04-25 16:34:33 +02:00
Vitaly Baranov
c92a8925e3 Refactoring of backup implementation to support archives more easily. 2022-04-25 16:34:33 +02:00
Vitaly Baranov
3966ee1e30 Use SeekableReadBuffer instead of ReadBuffer in IBackupEntry. 2022-04-25 16:34:33 +02:00
Vitaly Baranov
f14613f433 Implemented backup version 2: now files in backups are named by their checksums.
It will allow to store duplicate files only one time.
2022-04-25 16:34:33 +02:00
Vitaly Baranov
6c3333b50b RESTORE TABLE doesn't create containing database anymore 2022-04-25 16:34:33 +02:00
Vitaly Baranov
d20b3d78c5 Rename some restore settings. 2022-04-25 16:34:17 +02:00
Vitaly Baranov
6743eb6bef Correct error messages shown by File & Disk backup engines. 2022-04-25 16:33:38 +02:00
Robert Schulze
118e94523c
Activate clang-tidy warning "readability-container-contains"
This check suggests replacing <Container>.count() by
<Container>.contains() which is more speaking and in case of
multimaps/multisets also faster.
2022-04-18 23:53:11 +02:00
Vitaly Baranov
0ae63dfdbd
Fix code style in registerBackupEnginesFileAndDisk.cpp 2022-04-11 12:45:16 +02:00
Vitaly Baranov
bcd727d535 Allow creating directories containing a new archive. 2022-04-09 01:32:17 +02:00
Vitaly Baranov
fcd28fc3f4 Make backup metadata clearer with new setting 'use_base'. 2022-04-09 01:07:14 +02:00
Vitaly Baranov
71d54db215 Better handling arguments of backup engines. 2022-04-08 19:52:52 +02:00
Vitaly Baranov
46457c4d0c Improve removing of backup files after error. 2022-04-08 14:25:40 +02:00
Vitaly Baranov
51fc556fcd Implement BACKUP and RESTORE for MatViews. 2022-03-21 11:45:21 +01:00
Vitaly Baranov
ce25afb2e9 Storages and databases are hollow by default now. 2022-03-20 20:02:15 +01:00
Vitaly Baranov
18173d71fb A corresponding file in base backup can be searched by checksum too, not only by name. 2022-03-20 20:02:15 +01:00
Vitaly Baranov
c884cf901f Use BackupEntryFromAppendOnlyFile for Log engine,
and use a BackupEntriesBatch for Memort engine to improve performance.
A lot of minor corrections.
2022-03-20 20:02:15 +01:00
Vitaly Baranov
5f195d6ead Implement writing backups as zip archive. 2022-03-20 20:02:15 +01:00
Vitaly Baranov
ef57a87394 Add settings "throw_if_table_has_different_definition" and "throw_if_database_has_different_definition". 2022-03-20 20:02:15 +01:00
Vitaly Baranov
fd1d24f624 Add settings "throw_if_database_exists" and "throw_if_table_exists". 2022-03-20 20:02:15 +01:00
Vitaly Baranov
6849f51c3b Add setting "structure_only." 2022-03-20 20:02:15 +01:00
Vitaly Baranov
7f89b98308 Rework BackupSettings and RestoreSettings a little, pass StorageRestoreSettings to storages. 2022-03-20 20:02:15 +01:00
Vitaly Baranov
258a472001 Shorter names: rename IRestoreFromBackupTask -> IRestoreTask. 2022-03-20 20:02:15 +01:00
Vitaly Baranov
e8fc9cf476 Move renameInCreateQuery() to a better place. 2022-03-20 20:02:12 +01:00