Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ func runDump(ctx context.Context, cmd *cli.Command) error {
excludes = append(excludes, setting.LFS.Storage.Path)
excludes = append(excludes, setting.Attachment.Storage.Path)
excludes = append(excludes, setting.Packages.Storage.Path)
excludes = append(excludes, setting.RepoArchive.Storage.Path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we only need to exclude the repo archive path by default, no need to introduce a more flag.

Because the repo archives are automatically generated from existing repositories, so they would only be duplicate if they are copied into the dump.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So like, just skip them outright? Or skip by default and have a --include-repo-archive flag?

I imagine some people might want to take care of these files for keeping the hashes of the archives the same. Although I have not tested it, I assume timestamps are going to change between each time you regenerate the archive. Or do we just leave those people to make their own rsync script or something if they really need it?

Copy link
Contributor

@wxiaoguang wxiaoguang Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine some people might want to take care of these files for keeping the hashes of the archives the same.

As far as I know, I don't see there would be such users.

I assume timestamps are going to change between each time you regenerate the archive

That's a good point. But I think it doesn't matter because the archives are automatically generated when a visitor clicks the "download archive" button. And Gitea also supports "clean up the archives periodically" cron: archive_cleanup. These archives are just like "caches".

Or do we just leave those people to make their own rsync script or something if they really need it?

I think so. Or if there would be a real use case, we can still introduce this flag in the future.

excludes = append(excludes, setting.Log.RootPath)
if err := dumper.AddRecursiveExclude("data", setting.AppDataPath, excludes); err != nil {
fatal("Failed to include data directory: %v", err)
Expand Down