Fix path handling
This commit is contained in:
parent
79d54b65fb
commit
9b7b73f4b8
|
@ -16,31 +16,11 @@ func newKopiaCommand() *cli.Command {
|
|||
newKopiaBackupCommand(),
|
||||
newKopiaMaintenanceCommand(),
|
||||
},
|
||||
Flags: append([]cli.Flag{
|
||||
&cli.PathFlag{
|
||||
Name: "config",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "Path to the folder where the config should be written",
|
||||
EnvVars: envVars("CONFIG_PATH"),
|
||||
Value: "/tmp",
|
||||
},
|
||||
&cli.PathFlag{
|
||||
Name: "kopia-bin-path",
|
||||
Usage: "Kopia binary path",
|
||||
EnvVars: envVars("KOPIA_PATH"),
|
||||
Value: "/usr/local/bin/kopia",
|
||||
},
|
||||
&cli.PathFlag{
|
||||
Name: "cache-path",
|
||||
Usage: "Path where the cache is stored",
|
||||
EnvVars: envVars("KOPIA_CACHE_PATH"),
|
||||
Value: "/cache",
|
||||
},
|
||||
}, getRepositoryParams()...),
|
||||
Flags: getKopiaParams(),
|
||||
}
|
||||
}
|
||||
|
||||
func getRepositoryParams() []cli.Flag {
|
||||
func getKopiaParams() []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "access-key-id",
|
||||
|
@ -67,6 +47,25 @@ func getRepositoryParams() []cli.Flag {
|
|||
Usage: "Kopia S3 endpoint",
|
||||
EnvVars: envVars("ENDPOINT"),
|
||||
},
|
||||
&cli.PathFlag{
|
||||
Name: "config",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "Path to the folder where the config should be written",
|
||||
EnvVars: envVars("CONFIG_PATH"),
|
||||
Value: "/tmp",
|
||||
},
|
||||
&cli.PathFlag{
|
||||
Name: "kopia-bin-path",
|
||||
Usage: "Kopia binary path",
|
||||
EnvVars: envVars("KOPIA_PATH"),
|
||||
Value: "/usr/local/bin/kopia",
|
||||
},
|
||||
&cli.PathFlag{
|
||||
Name: "cache-path",
|
||||
Usage: "Path where the cache is stored",
|
||||
EnvVars: envVars("KOPIA_CACHE_PATH"),
|
||||
Value: "/cache",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ func newOperatorBackupCommand() *cli.Command {
|
|||
Usage: "Random ID for jobs, so that each kopia-k8s instance can operate on their own jobs",
|
||||
EnvVars: envVars("UUID"),
|
||||
},
|
||||
}, getRepositoryParams()...),
|
||||
}, getKopiaParams()...),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue