mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-10 23:52:16 +01:00
dump: add option to skip repository archives data
One might want to exclude this data when dumping, esp. since repository archives are more of temporary data by nature. Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
4ed10f782b
commit
e8a022ac9a
1 changed files with 9 additions and 0 deletions
|
@ -160,6 +160,10 @@ It can be used for backup and capture Forgejo server image to send to maintainer
|
|||
Name: "skip-index",
|
||||
Usage: "Skip bleve index data",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "skip-repo-archives",
|
||||
Usage: "Skip repository archives",
|
||||
},
|
||||
&cli.GenericFlag{
|
||||
Name: "type",
|
||||
Value: outputTypeEnum,
|
||||
|
@ -360,6 +364,11 @@ func runDump(ctx *cli.Context) error {
|
|||
excludes = append(excludes, setting.Indexer.IssuePath)
|
||||
}
|
||||
|
||||
if ctx.IsSet("skip-repo-archives") && ctx.Bool("skip-repo-archives") {
|
||||
log.Info("Skipping repository archives data")
|
||||
excludes = append(excludes, setting.RepoArchive.Storage.Path)
|
||||
}
|
||||
|
||||
excludes = append(excludes, setting.RepoRootPath)
|
||||
excludes = append(excludes, setting.LFS.Storage.Path)
|
||||
excludes = append(excludes, setting.Attachment.Storage.Path)
|
||||
|
|
Loading…
Reference in a new issue