-
-
Notifications
You must be signed in to change notification settings - Fork 82
/
redis-rdb-cli.conf
348 lines (305 loc) · 9.13 KB
/
redis-rdb-cli.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
#
# This parameter used in `rmt` and `rst` command.
# `rmt -s ./dump.rdb -m redis://127.0.0.1:6380`
# Above command using redis's `pipeline` to batch send 4096 commands to target redis
#
# If set `migrate_batch_size=1` means send every 1 command and then synchronize wait the sending result.
#
migrate_batch_size=4096
#
# This parameter used in `rmt` and `rst` command.
# `rmt -s ./dump.rdb -m redis://127.0.0.1:6380`
# Above command will open `migrate_threads`'s socket to async migrate data to target redis.
#
# This parameter MUST be power of 2, if `migrate_threads` <= 0 means sync(instead of async) migrate data to target redis.
#
migrate_threads=4
#
# This parameter used in `rmt` and `rst` command.
# `rmt -s ./dump.rdb -m redis://127.0.0.1:6380`
#
# if `migrate_flush = yes` means sent every 1 command then invoke `SocketOutputStream.flush()`
# if `migrate_flush = no` means sent every 64KB data then invoke `SocketOutputStream.flush()`
#
migrate_flush=yes
#
# This parameter used in `rmt` and `rst` command.
# `rmt -s ./dump.rdb -m redis://127.0.0.1:6380`
# If failed to migrate data to target redis. the `rmt` command will retry `migrate_retries` times to migrate data to target redis.
#
migrate_retries=1
#
# This parameter used in `rct -f dump`, `rct -f diff`, `rmt`, `rst`
# The generated dump aof use `dump_rdb_version` as RDB version
# `dump_rdb_version=-1` means use source RDB version.
#
# TBD
# Redis-7.2.x : `dump_rdb_version=11`
# Redis-7.0.x : `dump_rdb_version=10`
# Redis-6.2 : `dump_rdb_version=9`
# Redis-6.0.x : `dump_rdb_version=9`
# Redis-5.0.x : `dump_rdb_version=9`
# Redis-4.0.x : `dump_rdb_version=8`
# Redis-3.2 : `dump_rdb_version=7`
# Redis-3.0 : `dump_rdb_version=6`
# Redis-2.8 : `dump_rdb_version=6`
# Redis-2.6 : `dump_rdb_version=6`
#
dump_rdb_version=-1
#
# This parameter used in `rct -f resp` command.
# `rct -f resp -s ./dump.rdb -o ./appendonly.aof`
# Above command convert `set`, `list`, `hash` and `zset` type to aof command with 128 elements batch.
#
# If set `batch_size=1` means convert above types to aof command with only 1 elements.
#
batch_size=128
#
# Socket parameter
# Used in connection timeout and read timeout
# This parameter MUST greater than redis server's `repl-ping-slave-period`
#
timeout=60000
#
# Socket parameter
# SO_SNDBUF
# More details please refer to https://www.psc.edu/index.php/networking/641-tcp-tune
#
# `snd_buf=0` means use system default value
#
snd_buf=0
#
# Socket parameter
# SO_RCVBUF
# More details please refer to https://www.psc.edu/index.php/networking/641-tcp-tune
#
# `rcv_buf=0` means use system default value
#
rcv_buf=0
#
# This parameter will buffered the received data to speed up socket performance.
# By default the value is `8KB`
#
input_buffer_size=8192
#
# This parameter will buffered the sent data to speed up socket performance.
# By default the value is `8KB`
#
output_buffer_size=8192
#
# This parameter will buffered the sent data to speed up socket performance.
# if buffered data greater than max_output_buffer_size, that will create a temp
# file to store buffered data to reduce memory usage.
# By default the value is `512MB`
#
max_output_buffer_size=536870912
#
# Create temp file path. if not specific. use `java.io.tmpdir` by default.
#
temp_file_path=
#
# Create temp file with specific prefix.
#
temp_file_prefix=rct
#
# If source redis uri like the following
# rmt -s redis://host:port ...
# rct -s redis://host:port ...
# rdt -b redis://host:port ...
# rst -b redis://host:port ...
# ret -b redis://host:port ...
# The `heartbeat=1000` means every 1 second the `redis-rdb-cli`
# will send ping message to remote redis uri so that keep connection alive
#
heartbeat=1000
#
# If source redis uri like the following
# rmt -s redis://host:port ...
# rct -s redis://host:port ...
# rdt -b redis://host:port ...
# rst -b redis://host:port ...
# ret -b redis://host:port ...
# The `retries=5` means when disconnect with redis server.
# The `redis-rdb-cli` will retry to connect to remote redis uri to try `psync` process.
# No longer try to reconnect when 5 consecutive failures.
#
retries=5
#
# This parameter is used in conjunction with the `retries`
# Before try to reconnect. the `redis-rdb-cli` will sleep `retry_interval` and then to try reconnect to source redis.
# By default the value is 1 second.
#
retry_interval=1000
#
# If source redis uri like the following
# rmt -s redis://host:port ...
# rct -s redis://host:port ...
# rdt -b redis://host:port ...
# rst -b redis://host:port ...
# ret -b redis://host:port ...
#
# The `redis-rdb-cli` will use an async input stream to speed up socket performance. by default the value is `512KB`
#
async_cache_size=524288
#
# Metric parameter
#
# Metric data to exported. the valid value is `none`,`log` and `influxdb`
# By default the value is `none` that will totally not report metric. `log` will save metric points to log directory
# If the value is `influxdb`. the `metric_uri` take effect. that will push the metric data to `influxdb`.
#
metric_gateway=none
#
# Metric parameter
#
# Push the metric data to `influxdb`.
# This parameter only take effect when `metric_gateway=influxdb`
#
metric_uri=http://localhost:8086
#
# Metric parameter
# Set influxdb access username
# This parameter only take effect when `metric_gateway=influxdb`
#
metric_user=redis_rdb_cli
#
# Metric parameter
# Set influxdb access password
# This parameter only take effect when `metric_gateway=influxdb`
#
metric_pass=redis_rdb_cli
#
# Metric parameter
# Set influxdb database
# This parameter only take effect when `metric_gateway=influxdb`
#
metric_database=redis_rdb_cli
#
# Metric parameter
# Set influxdb retention policy
# This parameter only take effect when `metric_gateway=influxdb`
#
metric_retention_policy=30days
#
# Metric parameter
# This parameter only take effect when `metric_gateway=influxdb`
#
# Basically you should **NOT** to change this parameter. If changed, you may not see the dashboard because the showing data
# filtered by influxdb tag `instance`. But if you want to deploy multi `redis-rdb-cli` instance, you should change this parameter
# different between instances.
#
metric_instance=instance0
#
# redis 6 SSL parameters
# use openssl to generate keystore file
# `openssl pkcs12 -export -CAfile ca.crt -in redis.crt -inkey redis.key -out redis.p12`
# if redis uri is like `rediss://host:port`. following parameters take effect.
#
#
# SSL parameter
# redis 6 ssl support
# source redis keystore path
# example : `/path/to/redis.p12`
#
source_keystore_path=
#
# SSL parameter
# redis 6 ssl support
# source redis keystore password
# example : `123456`
#
source_keystore_pass=
#
# SSL parameter
# use java default truststore
#
source_default_truststore=false
#
# SSL parameter
# redis 6 ssl support
# source redis keystore type, default is pkcs12
#
source_keystore_type=pkcs12
#
# SSL parameter
# redis 6 ssl support
# target redis keystore path
# example : `/path/to/redis.p12`
#
target_keystore_path=
#
# SSL parameter
# redis 6 ssl support
# target redis keystore password
# example : `123456`
#
target_keystore_pass=
#
# SSL parameter
# use java default truststore
#
target_default_truststore=false
#
# SSL parameter
# redis 6 ssl support
# target redis keystore type, default is pkcs12
#
target_keystore_type=pkcs12
#
# This parameter used in `rct` like the following
# `rct -f keyval -s ./dump.rdb -o ./keyval.csv`
# The file `keyval.csv` will be split by <delimiter>. by default the delimiter is `,`
#
delimiter=\u002C
#
# This parameter used in `rct` like the following
# `rct -f keyval -s ./dump.rdb -o ./keyval.csv`
# The file `keyval.csv` will be quoted by <quote>. by default the quote is `"`
#
quote=\u0022
#
# This parameter used in `rct` like the following
# `rct -f json -s ./dump.rdb -o ./dump.json`
# If this value is true. the exported data will containing db, type and key's expiry.
#
export_meta=true
#
# This parameter used in `rct` like the following
# `rct -f mem -s ./dump.rdb -o ./dump.mem`
# If this value is true. the exported data will with unit like B, kB, MB, GB, TB, PB, EB.
#
export_unit=true
#
# This parameter used in `rct` like the following
# `rct -f mem -s ./dump.rdb -o ./dump.mem`
# If this value is true. the exported data show expiry as 'yyyy-MM-dd HH:mm:ss.SSS'
# If this value is false. the exported data show expiry as unix timestamp.
#
export_format_date=true
#
# This parameter used in `rct` like the following
# `rct -f mem -s ./dump.rdb -o ./dump.mem`
# `rct -f count -s ./dump.rdb -o ./dump.count`
# Export file format, by default is `csv`. the valid value is `csv` and `jsonl`
#
export_file_format=csv
#
# To show progress bar if this value is true
#
enable_progress_bar=true
#
# This parameter used in `rmonitor` like the following
# `rmonitor -s redis://127.0.0.1:6379 -n standalone`
# Fetch redis into every `monitor_refresh_interval` ms.
# By default this value is 15s
#
monitor_refresh_interval=15000
#
# If this value is `true` then use redis `SCAN` command to iterate key and value.
# The reason is under some cloud services, the PSYNC command is prohibited, so we use the `SCAN` command instead of the `PSYNC` command
#
enable_scan=false
#
# This parameter take effect when `enable_scan` is `true`. iterate key value as following batch size.
#
scan_step=512