Skip to content

Commit 162f93f

Browse files
committed
add flag to skip restores
1 parent 300551c commit 162f93f

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

cmd/pbm/config.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ import (
1818
)
1919

2020
type configOpts struct {
21-
rsync bool
22-
wait bool
23-
waitTime time.Duration
24-
list bool
25-
file string
26-
set map[string]string
27-
key string
21+
rsync bool
22+
skipRestores bool
23+
wait bool
24+
waitTime time.Duration
25+
list bool
26+
file string
27+
set map[string]string
28+
key string
2829
}
2930

3031
type confKV struct {

cmd/pbm/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ func (app *pbmApp) buildConfigCmd() *cobra.Command {
376376
}
377377

378378
configCmd.Flags().BoolVar(&cfg.rsync, "force-resync", false, "Resync backup list with the current store")
379+
configCmd.Flags().BoolVar(&cfg.skipRestores, "skip-restores", false, "Skip physical restore metadata during force-resync")
379380
configCmd.Flags().BoolVar(&cfg.list, "list", false, "List current settings")
380381
configCmd.Flags().StringVar(&cfg.file, "file", "", "Upload config from YAML file")
381382
configCmd.Flags().StringToStringVar(&cfg.set, "set", nil, "Set the option value <key.name=value>")

pbm/ctrl/cmd.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@ type ProfileCmd struct {
121121
}
122122

123123
type ResyncCmd struct {
124-
Name string `bson:"name,omitempty"`
125-
All bool `bson:"all,omitempty"`
126-
Clear bool `bson:"clear,omitempty"`
124+
Name string `bson:"name,omitempty"`
125+
All bool `bson:"all,omitempty"`
126+
Clear bool `bson:"clear,omitempty"`
127+
SkipRestores bool `bson:"skipRestores,omitempty"`
127128
}
128129

129130
type BackupCmd struct {

0 commit comments

Comments
 (0)