Skip to content

Commit 7b012ec

Browse files
authored
Enhance clickhouse-backup schema migration commands
Updated clickhouse-backup commands for schema migration to include named collections and split restore steps.
1 parent ebd1a05 commit 7b012ec

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

content/en/altinity-kb-setup-and-maintenance/altinity-kb-data-migration/add_remove_replica.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ clickhouse-client --host localhost --port 9000 -mn < schema.sql
101101
- Using `clickhouse-backup` to copy the schema of a replica to another is also convenient and moreover if [using Atomic database](/engines/altinity-kb-atomic-database-engine/) with `{uuid}` macros in [ReplicatedMergeTree engines](https://www.youtube.com/watch?v=oHwhXc0re6k):
102102

103103
```bash
104-
sudo -u clickhouse clickhouse-backup create --schema --rbac rbac_and_schema
105-
# From the destination replica
106-
sudo -u clickhouse clickhouse-backup restore --schema --rbac rbac_and_schema
104+
sudo -u clickhouse clickhouse-backup create --schema --rbac --named-collections rbac_and_schema
105+
# From the destination replica do this in 2 steps:
106+
sudo -u clickhouse clickhouse-backup restore --rbac-only rbac_and_schema
107+
sudo -u clickhouse clickhouse-backup restore --schema --named-collections rbac_and_schema
108+
107109
```
108110

109111
### Using `altinity operator`

0 commit comments

Comments
 (0)