Skip to content

Commit 0003443

Browse files
Update rsync.md
1 parent fc40ddd commit 0003443

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

  • content/en/altinity-kb-setup-and-maintenance/altinity-kb-data-migration

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ When migrating a large, live ClickHouse cluster (multi-terabyte scale) to a new
1010
1. **Prepare the new cluster**
1111
- Ensure the new cluster is set up with its own ZooKeeper (or Keeper).
1212
- Configure ClickHouse but keep it stopped initially.
13+
- For clickhouse-operator instances, you can stop all pods by CHI definition:
14+
```
15+
spec:
16+
stop: "true"
17+
```
18+
and attach volumes (PVC) to a service pod.
19+
1320
2. **Initial data sync**
1421

1522
Run a full recursive sync of the data directory from the old server to the new one:
@@ -27,7 +34,7 @@ When migrating a large, live ClickHouse cluster (multi-terabyte scale) to a new
2734
- `W`: copy whole files instead of using rsync’s delta algorithm (faster for large DB files).
2835
- --delete: remove files from the destination that don’t exist on the source.
2936

30-
If you plan to run several replicas on a new cluster, rsync data to all of them. To save the performance of production servers, you can copy data to 1 new replica and then use it as a source for others. However, you can start from a single replica and add more after switching.
37+
If you plan to run several replicas on a new cluster, rsync data to all of them. To save the performance of production servers, you can copy data to 1 new replica and then use it as a source for others. You can start with a single replica and add more after switching, but it will take more time afterward, as additional replicas need to pull all the data.
3138

3239
Add --bwlimit=100000 to preserve the performance of the production cluster while copying a lot of data.
3340

@@ -71,9 +78,5 @@ where engine ilike 'Replicated%'
7178
You'll need to use `/data1/clickhouse` instead of `/var/lib/clickhouse` in the rsync paths.
7279
7380
3. ClickHouse Docker container image does not have rsync installed. Add it using apt-get or run sidecar in k8s or run a service pod with volumes attached.
74-
For clickhouse-operator instances, you can to stop all pods by CHI definition.
75-
```
76-
spec:
77-
stop: "true"
78-
```
81+
7982

0 commit comments

Comments
 (0)