@@ -63,9 +63,9 @@ func main() {
6363 usage := `
6464Usage:
6565 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 ]
6969
7070Options:
7171 -n N, --ncpu=N Set runtime.GOMAXPROCS to N.
@@ -80,7 +80,8 @@ Options:
8080 --sockfile=FILE Use FILE to as socket buffer, default is disabled.
8181 --filesize=SIZE Set FILE size, default value is 1gb.
8282 -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.
8485 --filterdb=DB Filter db = DB, default is *.
8586 --psync Use PSYNC command.
8687`
@@ -120,11 +121,12 @@ Options:
120121 args .auth , _ = d ["--auth" ].(string )
121122 args .target , _ = d ["--target" ].(string )
122123
123- args .extra , _ = d ["--extra" ].(bool )
124- args .psync , _ = d ["--psync" ].(bool )
125- args .codis , _ = d ["--codis" ].(bool )
126124 args .sockfile , _ = d ["--sockfile" ].(string )
127125
126+ args .extra = d ["--extra" ].(bool )
127+ args .psync = d ["--psync" ].(bool )
128+ args .codis = d ["--codis" ].(bool ) || ! d ["--redis" ].(bool )
129+
128130 if s , ok := d ["--faketime" ].(string ); ok && s != "" {
129131 switch s [0 ] {
130132 case '-' , '+' :
0 commit comments