-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathredis.yaml
More file actions
280 lines (271 loc) · 9.38 KB
/
redis.yaml
File metadata and controls
280 lines (271 loc) · 9.38 KB
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
category: "数据库工具/Redis工具"
description: "Redis内存数据库管理与运维命令"
commands:
- name: "redis-cli"
description: "Redis command-line interface client"
category: "Database"
platforms:
- "linux"
- "darwin"
- "windows"
usage:
- "redis-cli [options] [command]"
options:
- flag: "-h"
description: "Server hostname (default: 127.0.0.1)"
- flag: "-p"
description: "Server port (default: 6379)"
- flag: "-a"
description: "Password for authentication"
- flag: "-n"
description: "Database number"
- flag: "--scan"
description: "Scan keys using pattern"
- flag: "--bigkeys"
description: "Find big keys in database"
- flag: "--latency"
description: "Monitor latency"
examples:
- command: "redis-cli"
description: "Connect to local Redis server"
- command: "redis-cli -h 192.168.1.100 -p 6379"
description: "Connect to remote Redis server"
- command: "redis-cli -a mypassword"
description: "Connect with password authentication"
- command: "redis-cli PING"
description: "Execute single command"
- command: "redis-cli --scan --pattern 'user:*'"
description: "Scan keys matching pattern"
- command: "redis-cli --bigkeys"
description: "Find largest keys in database"
risks:
- level: "high"
description: "Direct database access; can modify or delete data"
- level: "medium"
description: "Password visible in process list when using -a flag"
install_method: "Install Redis package or build from source"
version_check: "redis-cli --version"
- name: "redis-server"
description: "Redis server daemon"
category: "Database"
platforms:
- "linux"
- "darwin"
- "windows"
usage:
- "redis-server [config_file] [options]"
options:
- flag: "--port"
description: "Specify port number"
- flag: "--bind"
description: "Bind to specific network interface"
- flag: "--protected-mode"
description: "Enable/disable protected mode"
- flag: "--daemonize"
description: "Run as daemon"
- flag: "--save"
description: "Configure save points (seconds keys)"
examples:
- command: "redis-server"
description: "Start Redis with default configuration"
- command: "redis-server /etc/redis/redis.conf"
description: "Start Redis with config file"
- command: "redis-server --port 6380"
description: "Start on custom port"
- command: "redis-server --bind 127.0.0.1 --protected-mode yes"
description: "Start with security settings"
risks:
- level: "high"
description: "Running without authentication exposes data to network"
- level: "medium"
description: "Default configuration may not be suitable for production"
install_method: "Install Redis package or build from source"
version_check: "redis-server --version"
- name: "redis-benchmark"
description: "Redis performance benchmarking tool"
category: "Database"
platforms:
- "linux"
- "darwin"
- "windows"
usage:
- "redis-benchmark [options]"
options:
- flag: "-h"
description: "Server hostname"
- flag: "-p"
description: "Server port"
- flag: "-c"
description: "Number of parallel connections"
- flag: "-n"
description: "Total number of requests"
- flag: "-t"
description: "Only run specified tests (e.g., get,set)"
- flag: "-q"
description: "Quiet mode, show only requests per second"
examples:
- command: "redis-benchmark"
description: "Run default benchmark suite"
- command: "redis-benchmark -q"
description: "Quick benchmark with minimal output"
- command: "redis-benchmark -t get,set -n 100000 -c 50"
description: "Benchmark GET/SET with custom parameters"
- command: "redis-benchmark -h 192.168.1.100 -p 6379"
description: "Benchmark remote server"
risks:
- level: "medium"
description: "May impact server performance during benchmark"
- level: "low"
description: "Creates test data that should be cleaned up"
install_method: "Included with Redis installation"
version_check: "redis-benchmark --version"
- name: "redis-check-aof"
description: "Check and repair Redis AOF (Append-Only File)"
category: "Database"
platforms:
- "linux"
- "darwin"
- "windows"
usage:
- "redis-check-aof [--fix] <file.aof>"
options:
- flag: "--fix"
description: "Attempt to fix corrupted AOF file"
examples:
- command: "redis-check-aof appendonly.aof"
description: "Check AOF file for corruption"
- command: "redis-check-aof --fix appendonly.aof"
description: "Fix corrupted AOF file"
risks:
- level: "high"
description: "Fixing may truncate corrupted data; backup file first"
- level: "medium"
description: "Always stop Redis server before checking AOF"
install_method: "Included with Redis installation"
version_check: "redis-check-aof --help"
- name: "redis-check-rdb"
description: "Check Redis RDB snapshot file"
category: "Database"
platforms:
- "linux"
- "darwin"
- "windows"
usage:
- "redis-check-rdb <dump.rdb>"
examples:
- command: "redis-check-rdb dump.rdb"
description: "Check RDB file integrity"
risks:
- level: "low"
description: "Read-only operation; safe to use"
install_method: "Included with Redis installation"
version_check: "redis-check-rdb --help"
- name: "redis-sentinel"
description: "Redis Sentinel for high availability"
category: "Database"
platforms:
- "linux"
- "darwin"
- "windows"
usage:
- "redis-sentinel [config_file]"
examples:
- command: "redis-sentinel /etc/redis/sentinel.conf"
description: "Start Redis Sentinel with config"
- command: "redis-sentinel sentinel.conf --sentinel"
description: "Start in Sentinel mode"
risks:
- level: "high"
description: "Manages automatic failover; misconfiguration can cause data loss"
- level: "medium"
description: "Requires proper quorum configuration"
install_method: "Included with Redis installation"
version_check: "redis-sentinel --version"
- name: "redis-cli INFO"
description: "Get Redis server information and statistics"
category: "Database"
platforms:
- "linux"
- "darwin"
- "windows"
usage:
- "redis-cli INFO [section]"
examples:
- command: "redis-cli INFO"
description: "Get all server information"
- command: "redis-cli INFO server"
description: "Get server section info"
- command: "redis-cli INFO memory"
description: "Get memory usage statistics"
- command: "redis-cli INFO replication"
description: "Get replication information"
- command: "redis-cli INFO stats"
description: "Get general statistics"
risks:
- level: "low"
description: "Read-only operation; no risks"
install_method: "Included with Redis installation"
version_check: "redis-cli --version"
- name: "redis-cli MONITOR"
description: "Monitor all commands processed by Redis server"
category: "Database"
platforms:
- "linux"
- "darwin"
- "windows"
usage:
- "redis-cli MONITOR"
examples:
- command: "redis-cli MONITOR"
description: "Stream all commands in real-time"
risks:
- level: "medium"
description: "Can significantly impact performance on busy servers"
- level: "medium"
description: "May expose sensitive data in commands"
install_method: "Included with Redis installation"
version_check: "redis-cli --version"
- name: "redis-cli SAVE"
description: "Synchronously save dataset to disk"
category: "Database"
platforms:
- "linux"
- "darwin"
- "windows"
usage:
- "redis-cli SAVE"
examples:
- command: "redis-cli SAVE"
description: "Force synchronous save"
- command: "redis-cli BGSAVE"
description: "Background save (non-blocking)"
risks:
- level: "high"
description: "SAVE blocks server until complete; use BGSAVE for production"
- level: "medium"
description: "BGSAVE requires sufficient memory for fork operation"
install_method: "Included with Redis installation"
version_check: "redis-cli --version"
- name: "redis-cli FLUSHDB"
description: "Delete all keys in current database"
category: "Database"
platforms:
- "linux"
- "darwin"
- "windows"
usage:
- "redis-cli FLUSHDB [ASYNC]"
examples:
- command: "redis-cli FLUSHDB"
description: "Delete all keys in current database"
- command: "redis-cli FLUSHDB ASYNC"
description: "Delete asynchronously (non-blocking)"
- command: "redis-cli FLUSHALL"
description: "Delete all keys in all databases"
risks:
- level: "critical"
description: "Permanently deletes all data; cannot be undone"
- level: "high"
description: "FLUSHALL affects all databases on the server"
install_method: "Included with Redis installation"
version_check: "redis-cli --version"