Skip to content

Commit eb15872

Browse files
committed
Add --allow-partly-done option for cli
1 parent c940f3d commit eb15872

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

cmd/pbm/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,11 @@ func (app *pbmApp) buildRestoreCmd() *cobra.Command {
812812
&restoreOptions.fallback, "fallback-enabled", true,
813813
"Disables fallback sync feature when doing physical restore. Enabled by default.",
814814
)
815+
restoreCmd.Flags().BoolVar(
816+
&restoreOptions.allowPartlyDone, "allow-partly-done", true,
817+
"Allows parly done state of the cluster after physical restore. "+
818+
"If disabled, fallback will be applied when cluster is partly-done. Enabled by default.",
819+
)
815820

816821
restoreCmd.Flags().StringVar(&restoreOptions.rsMap, RSMappingFlag, "", RSMappingDoc)
817822
_ = viper.BindPFlag(RSMappingFlag, restoreCmd.Flags().Lookup(RSMappingFlag))

cmd/pbm/restore.go

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,21 @@ var (
3939
)
4040

4141
type restoreOpts struct {
42-
bcp string
43-
pitr string
44-
pitrBase string
45-
wait bool
46-
waitTime time.Duration
47-
extern bool
48-
ns string
49-
nsFrom string
50-
nsTo string
51-
usersAndRoles bool
52-
rsMap string
53-
conf string
54-
ts string
55-
fallback bool
42+
bcp string
43+
pitr string
44+
pitrBase string
45+
wait bool
46+
waitTime time.Duration
47+
extern bool
48+
ns string
49+
nsFrom string
50+
nsTo string
51+
usersAndRoles bool
52+
rsMap string
53+
conf string
54+
ts string
55+
fallback bool
56+
allowPartlyDone bool
5657

5758
numParallelColls int32
5859
numInsertionWorkers int32

0 commit comments

Comments
 (0)