diff --git a/src/restic/backend/local/config.go b/src/restic/backend/local/config.go index 16fdc3752..e693d8c9e 100644 --- a/src/restic/backend/local/config.go +++ b/src/restic/backend/local/config.go @@ -4,12 +4,17 @@ import ( "strings" "restic/errors" + "restic/options" ) // Config holds all information needed to open a local repository. type Config struct { Path string - Layout string `option:"layout"` + Layout string `option:"layout" help:"use this backend directory layout (default: auto-detect)"` +} + +func init() { + options.Register("local", Config{}) } // ParseConfig parses a local backend config. diff --git a/src/restic/backend/sftp/config.go b/src/restic/backend/sftp/config.go index 4321e71ad..1ba3dcbbd 100644 --- a/src/restic/backend/sftp/config.go +++ b/src/restic/backend/sftp/config.go @@ -6,13 +6,18 @@ import ( "strings" "restic/errors" + "restic/options" ) // Config collects all information required to connect to an sftp server. type Config struct { User, Host, Path string - Layout string `option:"layout"` - Command string `option:"command"` + Layout string `option:"layout" help:"use this backend directory layout (default: auto-detect)"` + Command string `option:"command" help:"specify command to create sftp connection"` +} + +func init() { + options.Register("sftp", Config{}) } // ParseConfig parses the string s and extracts the sftp config. The