Skip to content

Commit

Permalink
Add ParallelFilesUpload for schedule creation.
Browse files Browse the repository at this point in the history
Modify restore-helper print information.

Signed-off-by: Xun Jiang <[email protected]>
  • Loading branch information
blackpiglet committed Jan 30, 2024
1 parent 1034d6a commit 7aaf624
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/velero-restore-helper/velero-restore-helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ func done() bool {
doneFile := filepath.Join("/restores", child.Name(), ".velero", os.Args[1])

if _, err := os.Stat(doneFile); os.IsNotExist(err) {
fmt.Printf("Not found: %s\n", doneFile)
fmt.Printf("The filesystem restore done file %s is not found yet. Retry later.\n", doneFile)
return false
} else if err != nil {
fmt.Fprintf(os.Stderr, "ERROR looking for %s: %s\n", doneFile, err)
fmt.Fprintf(os.Stderr, "ERROR looking filesystem restore done file %s: %s\n", doneFile, err)
return false
}

Expand Down
6 changes: 6 additions & 0 deletions pkg/cmd/cli/schedule/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
schedule.Spec.Template.ResourcePolicy = &v1.TypedLocalObjectReference{Kind: resourcepolicies.ConfigmapRefType, Name: o.BackupOptions.ResPoliciesConfigmap}
}

if o.BackupOptions.ParallelFilesUpload > 0 {
schedule.Spec.Template.UploaderConfig = &api.UploaderConfigForBackup{
ParallelFilesUpload: o.BackupOptions.ParallelFilesUpload,
}
}

if printed, err := output.PrintWithFormat(c, schedule); printed || err != nil {
return err
}
Expand Down

0 comments on commit 7aaf624

Please sign in to comment.