-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Don't store repo archives on gitea dump
#35467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't store repo archives on gitea dump
#35467
Conversation
@@ -265,6 +269,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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Signed-off-by: h7x4 <[email protected]>
e48fd27
to
8cc0f98
Compare
--skip-repo-archive
flag to dump commandgitea dump
* giteaofficial/main: Fix different behavior in status check pattern matching with double stars (go-gitea#35474) Replace webpack with rspack (go-gitea#35460) Don't store repo archives on `gitea dump` (go-gitea#35467) Fix SSH signing key path will be displayed in the pull request UI (go-gitea#35381) [skip ci] Updated translations via Crowdin Update image name in integration README (go-gitea#35465)
* origin/main: Clean up npm dependencies (go-gitea#35484) Update eslint to v9 (go-gitea#35485) Revert the rspack change (go-gitea#35482) Replace gobwas/glob package (go-gitea#35478) Fix various typos in codebase (go-gitea#35480) Fix different behavior in status check pattern matching with double stars (go-gitea#35474) Replace webpack with rspack (go-gitea#35460) Don't store repo archives on `gitea dump` (go-gitea#35467)
When running
gitea dump
, don't store the contents ofdata/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
Added a--skip-repo-archive
flag to thegitea dump
command.Enabling this flag will exclude the contents ofdata/repo-archive
from the dump. The implementation is similar to the other--skip-*
flags that excludes directories fromdata
.