mirror of
https://github.com/kopia/kopia.git
synced 2026-09-08 11:26:03 -04:00
Tools to help investigate repository structures safely (#553)
* cli: added 'index inspect' which can dump contents of index blob or local file * repo: added read-only option when connecting to a repo which prevents any mutations Co-authored-by: Julio Lopez <julio+gh@k....io>
This commit is contained in:
1 parent
f41e904a01
commit
c11850cfb7
11 files changed
+167
-2
No files matched your search
@@ -22,6 +22,7 @@
|
||||
connectHostname string
|
||||
connectUsername string
|
||||
connectCheckForUpdates bool
|
||||
connectReadonly bool
|
||||
)
|
||||
|
||||
func setupConnectOptions(cmd *kingpin.CmdClause) {
|
||||
@@ -35,6 +36,7 @@ func setupConnectOptions(cmd *kingpin.CmdClause) {
|
||||
cmd.Flag("override-hostname", "Override hostname used by this repository connection").Hidden().StringVar(&connectHostname)
|
||||
cmd.Flag("override-username", "Override username used by this repository connection").Hidden().StringVar(&connectUsername)
|
||||
cmd.Flag("check-for-updates", "Periodically check for Kopia updates on GitHub").Default("true").Envar(checkForUpdatesEnvar).BoolVar(&connectCheckForUpdates)
|
||||
cmd.Flag("readonly", "Make repository read-only to avoid accidental changes").BoolVar(&connectReadonly)
|
||||
}
|
||||
|
||||
func connectOptions() *repo.ConnectOptions {
|
||||
@@ -48,6 +50,7 @@ func connectOptions() *repo.ConnectOptions {
|
||||
},
|
||||
HostnameOverride: connectHostname,
|
||||
UsernameOverride: connectUsername,
|
||||
ReadOnly: connectReadonly,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user