You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* avoid the file to be checked by the json schema validator
* commit updated mock
* create Init method
* allow run-schedule command on v2 format
* merge ProfileName and Profiles into one Profiles field
* fix: remove schedule name from arguments
* docs: add information on run-schedule command
* update crond to support new run-schedule command line
* add a default log file on darwin
* Merge from pass-context-struct
* return a new context on each `With` method
* add tests
* move logTarget to context
* refactoring Context struct
* pass context to own commands and profile runnner
flags: map[string]string{"-v, --verbose": "display detailed version information"},
58
59
},
60
+
{
61
+
name: "random-key",
62
+
description: "generate a cryptographically secure random key to use as a restic keyfile",
63
+
action: randomKey,
64
+
needConfiguration: false,
65
+
hide: true, // replaced by the generate command
66
+
},
67
+
{
68
+
name: "generate",
69
+
description: "generate resources such as random key, bash/zsh completion scripts, etc.",
70
+
longDescription: "The \"generate\" command is used to create various resources and print them to stdout",
71
+
action: generateCommand,
72
+
needConfiguration: false,
73
+
hide: false,
74
+
flags: map[string]string{
75
+
"--random-key [size]": "generate a cryptographically secure random key to use as a restic keyfile (size defaults to 1024 when omitted)",
76
+
"--config-reference [--version 0.15] [template]": "generate a config file reference from a go template (defaults to the built-in markdown template when omitted)",
77
+
"--json-schema [--version 0.15] [v1|v2]": "generate a JSON schema that validates resticprofile configuration files in YAML or JSON format",
78
+
"--bash-completion": "generate a shell completion script for bash",
79
+
"--zsh-completion": "generate a shell completion script for zsh",
80
+
},
81
+
},
82
+
// commands that need the configuration
59
83
{
60
84
name: "profiles",
61
85
description: "display profile names from the configuration file",
flags: map[string]string{"--all": "display the status of all scheduled jobs of all profiles"},
109
126
},
110
127
{
111
-
name: "generate",
112
-
description: "generate resources such as random key, bash/zsh completion scripts, etc.",
113
-
longDescription: "The \"generate\" command is used to create various resources and print them to stdout",
114
-
action: generateCommand,
115
-
needConfiguration: false,
128
+
name: "run-schedule",
129
+
description: "runs a scheduled job. This command should only be called by the scheduling service",
130
+
longDescription: "The \"run-schedule\" command loads the scheduled job configuration from the name in parameter and runs the restic command with the arguments defined in the profile. The name in parameter is <command>@<profile-name> for the configuration file v1, and the schedule name for the configuration file v2+.",
131
+
pre: preRunSchedule,
132
+
action: runSchedule,
133
+
needConfiguration: true,
116
134
hide: false,
117
-
flags: map[string]string{
118
-
"--random-key [size]": "generate a cryptographically secure random key to use as a restic keyfile (size defaults to 1024 when omitted)",
119
-
"--config-reference [--version 0.15] [template]": "generate a config file reference from a go template (defaults to the built-in markdown template when omitted)",
120
-
"--json-schema [--version 0.15] [v1|v2]": "generate a JSON schema that validates resticprofile configuration files in YAML or JSON format",
121
-
"--bash-completion": "generate a shell completion script for bash",
122
-
"--zsh-completion": "generate a shell completion script for zsh",
0 commit comments