-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Dump github/gitlab/gitea repository data to a local directory and restore to gitea #12244
Conversation
f98c0fa
to
041836f
Compare
@lunny one thing left: we should also save the git-service type and source url somewhere |
... to be able to migrate issue/pull ownership to existing users as we can do with the normal github/gitlab migration now |
ca69b71
to
0c29eee
Compare
Codecov Report
@@ Coverage Diff @@
## master #12244 +/- ##
==========================================
+ Coverage 42.59% 43.25% +0.66%
==========================================
Files 671 645 -26
Lines 73635 71468 -2167
==========================================
- Hits 31365 30917 -448
+ Misses 37184 35543 -1641
+ Partials 5086 5008 -78
Continue to review full report at Codecov.
|
please resolve conflict |
4ffbe89
to
af69f37
Compare
CI fail is related:
|
I think we should stave CloneURL to yaml too |
af69f37
to
b7f185a
Compare
7ad9edd
to
5342029
Compare
5342029
to
48d24d2
Compare
Codecov Report
@@ Coverage Diff @@
## master #12244 +/- ##
==========================================
- Coverage 42.36% 42.06% -0.30%
==========================================
Files 728 733 +5
Lines 78015 78666 +651
==========================================
+ Hits 33049 33093 +44
- Misses 39540 40159 +619
+ Partials 5426 5414 -12
Continue to review full report at Codecov.
|
@lunny "migrations/restore.go exported methods should have comment or be unexported" |
f9b17ae
to
13717d8
Compare
…pend on downloader
b1aab92
to
695d23e
Compare
@techknowlogick done. |
Currently online migrating is possible but in fact, it depends on the internet network status what's a mess. This PR makes it possible to dump a repository on GitHub/GitLab/Gitea to a disk directory and then transfer it to another Gitea instance via the possible transfer method. And then restore the repository on the target Gitea instance.
i.e. Gitea repository itself in GitHub spent about 80 GB but transfer 80GB online is almost impossible. Then we can dump the repository to a host nearby Github's host and then compress it and transfer it to another host.
A new Gitea command has been added to do the things, you can use it as below:
A dumped repository(go-gitea/test_repo) directory structure like this.
Another command is
restore-repo
added from this PR which could restore the repository to a Gitea instance from the dumped folder.And this could be also used as a backup tool to backup repositories in Github/Gitlab/Gitea .
gitea dump-repo
gitea restore-repo