diff --git a/cmd/dump.go b/cmd/dump.go index 73c2251b9..6569fb6e3 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -146,6 +146,10 @@ It can be used for backup and capture Gitea server image to send to maintainer`, Name: "skip-package-data", Usage: "Skip package data", }, + cli.BoolFlag{ + Name: "skip-index", + Usage: "Skip bleve index data", + }, cli.GenericFlag{ Name: "type", Value: outputTypeEnum, @@ -327,6 +331,11 @@ func runDump(ctx *cli.Context) error { excludes = append(excludes, opts.ProviderConfig) } + if ctx.IsSet("skip-index") && ctx.Bool("skip-index") { + excludes = append(excludes, setting.Indexer.RepoPath) + excludes = append(excludes, setting.Indexer.IssuePath) + } + excludes = append(excludes, setting.RepoRootPath) excludes = append(excludes, setting.LFS.Path) excludes = append(excludes, setting.Attachment.Path)