MCPcopy
hub / github.com/kopia/kopia / setup

Method setup

cli/command_index_recover.go:29–40  ·  view source on GitHub ↗
(svc appServices, parent commandParent)

Source from the content-addressed store, hash-verified

27}
28
29func (c *commandIndexRecover) setup(svc appServices, parent commandParent) {
30 cmd := parent.Command("recover", "Recover indexes from pack blobs")
31 cmd.Flag("blob-prefixes", "Prefixes of pack blobs to recover from (default=all packs)").StringsVar(&c.blobPrefixes)
32 cmd.Flag("blobs", "Names of pack blobs to recover from (default=all packs)").StringsVar(&c.blobIDs)
33 cmd.Flag("parallel", "Recover parallelism").Default("1").IntVar(&c.parallel)
34 cmd.Flag("ignore-errors", "Ignore errors when recovering").BoolVar(&c.ignoreErrors)
35 cmd.Flag("delete-indexes", "Delete all indexes before recovering").BoolVar(&c.deleteIndexes)
36 cmd.Flag("commit", "Commit recovered content").BoolVar(&c.commit)
37 cmd.Action(svc.directRepositoryWriteAction(c.run))
38
39 c.svc = svc
40}
41
42func (c *commandIndexRecover) run(ctx context.Context, rep repo.DirectRepositoryWriter) error {
43 c.svc.dangerousCommand()

Callers

nothing calls this directly

Calls 2

CommandMethod · 0.80

Tested by

no test coverage detected