Skip to content

Commit 7a474d1

Browse files
h7x4lunny
andauthored
Don't store repo archives on gitea dump (#35467)
When running `gitea dump`, don't store the contents of `data/repo-archive` in the output. These archives can easily be regenerated from the repository data, and does not need to be backed up. Fixes #35450 --- <s>Added a `--skip-repo-archive` flag to the `gitea dump` command. Enabling this flag will exclude the contents of `data/repo-archive` from the dump. The implementation is similar to the other `--skip-*` flags that excludes directories from `data`.</s> Signed-off-by: h7x4 <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
1 parent 84812e4 commit 7a474d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/dump.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ func runDump(ctx context.Context, cmd *cli.Command) error {
265265
excludes = append(excludes, setting.LFS.Storage.Path)
266266
excludes = append(excludes, setting.Attachment.Storage.Path)
267267
excludes = append(excludes, setting.Packages.Storage.Path)
268+
excludes = append(excludes, setting.RepoArchive.Storage.Path)
268269
excludes = append(excludes, setting.Log.RootPath)
269270
if err := dumper.AddRecursiveExclude("data", setting.AppDataPath, excludes); err != nil {
270271
fatal("Failed to include data directory: %v", err)

0 commit comments

Comments
 (0)