@@ -63,9 +63,9 @@ func main() {
63
63
usage := `
64
64
Usage:
65
65
redis-port decode [--ncpu=N] [--parallel=M] [--input=INPUT] [--output=OUTPUT]
66
- redis-port restore [--ncpu=N] [--parallel=M] [--input=INPUT] --target=TARGET [--codis ] [--auth=AUTH] [--faketime=FAKETIME] [--filterdb=DB ] [--extra ]
67
- redis-port sync [--ncpu=N] [--parallel=M] --from=MASTER [--password=PASSWORD] --target=TARGET [--codis ] [--auth=AUTH] [--sockfile=FILE [--filesize=SIZE]] [--filterdb=DB] [--psync ]
68
- redis-port dump [--ncpu=N] [--parallel=M] --from=MASTER [--password=PASSWORD] [--output=OUTPUT] [--extra ]
66
+ redis-port restore [--ncpu=N] [--parallel=M] [--input=INPUT] [--faketime=FAKETIME] [--extra ] [--filterdb=DB] --target=TARGET [--auth=AUTH ] [--redis|--codis ]
67
+ redis-port sync [--ncpu=N] [--parallel=M] --from=MASTER [--password=PASSWORD] [--psync] [--filterdb=DB] --target=TARGET [--auth=AUTH ] [--redis|--codis] [--sockfile=FILE [--filesize=SIZE]]
68
+ redis-port dump [--ncpu=N] [--parallel=M] --from=MASTER [--password=PASSWORD] [--extra] [--output=OUTPUT ]
69
69
70
70
Options:
71
71
-n N, --ncpu=N Set runtime.GOMAXPROCS to N.
@@ -80,7 +80,8 @@ Options:
80
80
--sockfile=FILE Use FILE to as socket buffer, default is disabled.
81
81
--filesize=SIZE Set FILE size, default value is 1gb.
82
82
-e, --extra Set true to send/receive following redis commands, default is false.
83
- --codis Target is codis proxy or normal redis instance.
83
+ --redis Target is normal redis instance, default is false.
84
+ --codis Target is codis proxy, default is true.
84
85
--filterdb=DB Filter db = DB, default is *.
85
86
--psync Use PSYNC command.
86
87
`
@@ -120,11 +121,12 @@ Options:
120
121
args .auth , _ = d ["--auth" ].(string )
121
122
args .target , _ = d ["--target" ].(string )
122
123
123
- args .extra , _ = d ["--extra" ].(bool )
124
- args .psync , _ = d ["--psync" ].(bool )
125
- args .codis , _ = d ["--codis" ].(bool )
126
124
args .sockfile , _ = d ["--sockfile" ].(string )
127
125
126
+ args .extra = d ["--extra" ].(bool )
127
+ args .psync = d ["--psync" ].(bool )
128
+ args .codis = d ["--codis" ].(bool ) || ! d ["--redis" ].(bool )
129
+
128
130
if s , ok := d ["--faketime" ].(string ); ok && s != "" {
129
131
switch s [0 ] {
130
132
case '-' , '+' :
0 commit comments