diff --git a/commands.go b/commands.go index 1d84d7bc..c414b219 100644 --- a/commands.go +++ b/commands.go @@ -585,8 +585,8 @@ func getRemovableScheduleJobs(c *config.Config, flags commandLineFlags) (schedul } func preRunSchedule(ctx *Context) error { - if len(ctx.request.arguments) != 1 { - return errors.New("run-schedule command expects one argument (only): schedule name") + if len(ctx.request.arguments) < 1 { + return errors.New("run-schedule command expects one argument: schedule name") } scheduleName := ctx.request.arguments[0] if ctx.config.GetVersion() < config.Version02 { @@ -598,6 +598,8 @@ func preRunSchedule(ctx *Context) error { ctx.request.profile = profileName ctx.request.schedule = scheduleName ctx.command = commandName + // remove the parameter from the arguments + ctx.request.arguments = ctx.request.arguments[1:] // don't save the profile in the context now, it's only loaded but not prepared profile, err := ctx.config.GetProfile(profileName) diff --git a/examples/dev.yaml b/examples/dev.yaml index b7b0184e..c26d18bc 100644 --- a/examples/dev.yaml +++ b/examples/dev.yaml @@ -11,7 +11,7 @@ global: # legacy-arguments: true group-continue-on-error: true restic-lock-retry-after: "1m" - log: "_global.txt" + # log: "_global.txt" groups: full-backup: