Skip to content

Commit d688cad

Browse files
author
Shlomi Noach
committed
cheatsheet text
1 parent 6aba76c commit d688cad

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

doc/cheatsheet.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,33 @@ If your master works with SBR, this is the mode to work with. The replica must b
1919

2020
However even with RBR we suggest this is the least master-intrusive operation mode.
2121

22+
```
23+
gh-ost \
24+
--max-load=Threads_running=25 \
25+
--critical-load=Threads_running=1000 \
26+
--chunk-size=1000 \
27+
--throttle-control-replicas="myreplica.1.com,myreplica.2.com" \
28+
--max-lag-millis=1500 \
29+
--user="gh-ost" \
30+
--password="123456" \
31+
--host=replica.with.rbr.com \
32+
--database="my_schema" \
33+
--table="my_table" \
34+
--verbose \
35+
--alter="engine=innodb" \
36+
--switch-to-rbr \
37+
--allow-master-master \
38+
--cut-over=default \
39+
--exact-rowcount \
40+
--default-retries=120 \
41+
--panic-flag-file=/tmp/ghost.panic.flag \
42+
--postpone-cut-over-flag-file=/tmp/ghost.postpone.flag \
43+
[--execute]
44+
```
45+
46+
With `--execute`, migration actually copies data and flips tables. Without it this is a `noop` run.
47+
48+
2249
##### b. Connect to master
2350

2451
If you don't have replicas, or do not wish to use them, you are still able to operate directly on the master. `gh-ost` will do all operations directly on the master. You may still ask it to be considerate of replication lag.

0 commit comments

Comments
 (0)