Commit Graph

116 Commits

Author SHA1 Message Date
Pradeep Chhetri
deaa70fb14
Merge branch 'master' into pchhetri/fix-45690 2023-01-30 21:35:16 +08:00
Pradeep Chhetri
d52c841d7d Fix test 2023-01-29 11:35:00 +08:00
Pradeep Chhetri
18cf0fd2c1 Fix test 2023-01-29 10:29:10 +08:00
Pradeep Chhetri
65301cf55a Format fixes 2023-01-29 09:03:51 +08:00
Pradeep Chhetri
0e02f82665 Add test for zip archive with bad settings 2023-01-29 08:40:24 +08:00
Aleksandr Musorin
838acb22b7
added num_processed_files and processed_files_size 2023-01-20 10:20:41 +01:00
Vitaly Baranov
5aaff60650 Fix referential dependencies when host & post in a clickHouse dictionary source are set by default. 2022-12-12 18:22:14 +01:00
Vitaly Baranov
76ba8ab3d4 Add new tests. 2022-12-12 18:22:09 +01:00
Vitaly Baranov
e1f7f04752
Referential dependencies for RESTORE (#43834)
* Rename DDLDependencyVisitor -> DDLLoadingDependencyVisitor.

* Move building a loading graph to TablesLoader.

* Implement referential dependencies for tables and use them
when restoring tables from a backup.

* Remove StorageID::operator < (because of its inconsistency with ==).

* Add new tests.

* Fix test.

* Fix memory leak.

Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2022-12-02 15:05:46 +01:00
Azat Khuzhin
94566abda9 Fix reusing of files > 4GB from base backup
Previosly u64 numbers was truncated to u32 numbers during writing to the
mdatadata xml file, and further incremental backup cannot reuse them,
since the file in base backup is smaller.

P.S. There can be other places, I thought about enabling
-Wshorten-64-to-32, but there are lots of warnings right now.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-07 14:56:09 +02:00
Alexey Milovidov
13a129bee7 Merge branch 'master' into remove-useless-line 2022-09-04 03:24:40 +02:00
Vitaly Baranov
007ae0e6cc Fix incremental backups for Log family. 2022-08-31 12:57:28 +02:00
Alexey Milovidov
b42d26acfe Remove one line from XML, because we do not care 2022-08-28 02:44:02 +02:00
alesapin
704d7fdc41 Fix copy and use disks 2022-08-21 18:18:35 +02:00
Vitaly Baranov
dc25f18f13 Fix flaky integration test test_async_backups_to_same_destination. 2022-08-03 14:22:09 +02:00
Vitaly Baranov
794eeb5d51 Split "total_size" to "uncompressed_size" and "compressed_size". 2022-07-27 10:36:56 +02:00
Vitaly Baranov
a79fc17235 Add test for system.backups 2022-07-27 09:04:10 +02:00
Vitaly Baranov
51a2bf33e8 Rename backup statuses to CREATING_BACKUP, BACKUP_CREATED, BACKUP_FAILED, RESTORING, RESTORED, RESTORE_FAILED. 2022-07-27 09:04:10 +02:00
Vitaly Baranov
fc16a15ecf Rename column "uuid" -> "id" in system.backups and allow user to set it in a query. 2022-07-27 09:04:10 +02:00
Vitaly Baranov
131019ba49 Rename column "backup_name" -> "name" in system.backups. 2022-07-27 09:04:10 +02:00
Vitaly Baranov
6174fe1d72 Fix tests. 2022-07-22 18:33:46 +02:00
Vitaly Baranov
2f47be5da7 Check that the destination for a backup is not in use. 2022-07-15 13:34:58 +02:00
Vitaly Baranov
43d35eec1b Write unfinished mutations to backup. 2022-07-05 14:51:09 +02:00
Vitaly Baranov
e367d96964 Fix style. 2022-06-30 15:10:33 +02:00
Vitaly Baranov
031ca28fdc Add test for partition clause. More checks for data compatibility on restore. 2022-06-30 08:37:18 +02:00
Vitaly Baranov
11b51d2878 Implement storing UDF in backups. 2022-06-30 08:37:17 +02:00
Vitaly Baranov
64b51a3772 Improve gathering metadata for backup. 2022-06-30 08:37:17 +02:00
Vitaly Baranov
47ac47350b Store projections in backups. 2022-06-30 08:37:17 +02:00
Vitaly Baranov
5ae8fce1ef Attach threads to thread groups better. 2022-06-22 18:51:41 +02:00
Vitaly Baranov
b0d19328b8 Add test for ReplicatedAccessStorage. 2022-06-19 14:14:41 +02:00
Vitaly Baranov
9f197defda Add support for setting 'allow_backup' to skip access entities from putting to backup. 2022-06-19 12:49:50 +02:00
Vitaly Baranov
01aaaf7395 More accurate access checking for RESTORE. 2022-06-19 11:26:41 +02:00
Vitaly Baranov
de9a07d18d Fix RESTORE ALL for tables without database in backup. 2022-06-18 14:07:01 +02:00
Vitaly Baranov
36475c5b98 Fix handling empty files in backups. 2022-06-18 12:28:32 +02:00
Vitaly Baranov
a0c558a17e Implement backup/restore for ACL system tables (system.users, system.roles, etc.) 2022-06-17 18:14:31 +02:00
Vitaly Baranov
c2c35fad82 Refactoring of the code getting create table queries for backup. 2022-06-15 20:32:35 +02:00
Vitaly Baranov
1198e86295 Fix storing temporary tables and skipping system tables while making a backup. 2022-06-15 20:32:34 +02:00
Vitaly Baranov
b2323991d6 BACKUP DATABASE now stores inner tables of matviews only if the corresponding matviews are stored. 2022-06-15 20:32:34 +02:00
Vitaly Baranov
6877b8f864 Fix renaming visitor. 2022-06-15 20:32:34 +02:00
Vitaly Baranov
d78a2cda72 Restore tables regarding their dependencies. 2022-06-15 20:32:34 +02:00
Vitaly Baranov
ce1836f0d2 Lock tables for share before backup and restore. 2022-06-15 20:28:43 +02:00
Vitaly Baranov
131382e025 Fix async tests. 2022-06-15 20:28:42 +02:00
Vitaly Baranov
c1baad0763 Fix style. 2022-05-15 14:09:42 +02:00
Vitaly Baranov
23322b0bf6 Add async tests. 2022-05-12 19:42:05 +02:00
Vitaly Baranov
1b2eb4fe27 Use more clear syntax for BACKUP/RESTORE. 2022-05-08 10:37:02 +02:00
Vitaly Baranov
202dd864ed Fix compilation. 2022-05-03 18:34:29 +02:00
Vitaly Baranov
828f45f078 Add new restore setting 'allow_non_empty_tables'. 2022-05-03 16:18:45 +02:00
Vitaly Baranov
a8e924caf6 Make BACKUP & RESTORE synchronous by default. 2022-04-26 18:45:39 +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
4de4fff590 Fix tests. 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
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
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
d20b3d78c5 Rename some restore settings. 2022-04-25 16:34:17 +02:00
Mikhail f. Shiryaev
e6f5a3f98b
Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
Vitaly Baranov
51fc556fcd Implement BACKUP and RESTORE for MatViews. 2022-03-21 11:45:21 +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
5f195d6ead Implement writing backups as zip archive. 2022-03-20 20:02:15 +01:00
Vitaly Baranov
e72a343994 Implement BACKUP & RESTORE for the Memory table engine. 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
71359433dd Add parameters "backups.allowed_path" and "backups.allowed_disk" to config. 2021-11-10 11:03:09 +03:00
Vitaly Baranov
508fb6f54f Use external dirs in the integration test to make test not flaky. 2021-11-10 11:03:09 +03:00
Vitaly Baranov
606e94f4cc Fix backup of database. 2021-11-10 11:03:09 +03:00
Vitaly Baranov
cf77c0b3fc New syntax for BACKUP/RESTORE: set backup engine explicitly. 2021-11-09 23:16:40 +03:00
Vitaly Baranov
a1f29d31ea Support BACKUP & RESTORE for log family. 2021-11-01 12:07:17 +03:00
Vitaly Baranov
63e8bc1f20 Added new commands BACKUP and RESTORE. 2021-08-23 23:41:45 +03:00