Unable to migrate large repository #3067

Closed
opened 2025-11-02 04:59:35 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @ScottBeeson on GitHub (Mar 18, 2019).

  • Gitea version (or commit ref): 1.7.4
  • Git version: 2.2.1.0.windows.1
  • Operating system: Windows Server 2016
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
2019/03/18 07:39:38 [...routers/repo/repo.go:146 handleCreateError()] [E] MigratePost: Clone: exit status 1
2019/03/18 09:06:08 [...routers/repo/repo.go:146 handleCreateError()] [E] MigratePost: Clone: exit status 1

Description

I was able to migrate a couple test repositories but when I tried to migrate our main repo, which is around 40 gigs, I eventually get a 500 error page and the .git folder disappears from the file system.

I also have the following events in the Chrome console:

Active resource loading counts reached a per-frame limit while the tab was in background. Network requests will be delayed until a previous loading finishes, or the tab is brought to the foreground. See https://www.chromestatus.com/feature/5527160148197376 for more details

Failed to load resource: the server responded with a status of 404 (Not Found)

Screenshots

image

Originally created by @ScottBeeson on GitHub (Mar 18, 2019). - Gitea version (or commit ref): 1.7.4 - Git version: 2.2.1.0.windows.1 - Operating system: Windows Server 2016 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ``` 2019/03/18 07:39:38 [...routers/repo/repo.go:146 handleCreateError()] [E] MigratePost: Clone: exit status 1 2019/03/18 09:06:08 [...routers/repo/repo.go:146 handleCreateError()] [E] MigratePost: Clone: exit status 1 ``` ## Description I was able to migrate a couple test repositories but when I tried to migrate our main repo, which is around 40 gigs, I eventually get a 500 error page and the .git folder disappears from the file system. I also have the following events in the Chrome console: ``` Active resource loading counts reached a per-frame limit while the tab was in background. Network requests will be delayed until a previous loading finishes, or the tab is brought to the foreground. See https://www.chromestatus.com/feature/5527160148197376 for more details Failed to load resource: the server responded with a status of 404 (Not Found) ``` ## Screenshots ![image](https://user-images.githubusercontent.com/108358/54546259-48061100-4971-11e9-86bd-a98930261573.png)
GiteaMirror added the issue/confirmedtype/enhancement labels 2025-11-02 04:59:35 -06:00
Author
Owner

@ScottBeeson commented on GitHub (Mar 18, 2019):

Can I add a repo manually by copying the files then adding it to the repository table in the gitea.db database?

@ScottBeeson commented on GitHub (Mar 18, 2019): Can I add a repo manually by copying the files then adding it to the `repository` table in the gitea.db database?
Author
Owner

@zeripath commented on GitHub (Mar 18, 2019):

The simplest option is to create an empty repo and push to it using the CMD line.

However I think we should make it possible to just adopt repositories if they're there.

@zeripath commented on GitHub (Mar 18, 2019): The simplest option is to create an empty repo and push to it using the CMD line. However I think we should make it possible to just adopt repositories if they're there.
Author
Owner

@ScottBeeson commented on GitHub (Mar 18, 2019):

Okay, I guess I'll try that. So basically, I make sure my repo is up-to-date from my old server. I create a new Gitea repo. I change the remote on my local machine to the new Gitea remote. Then I push.

Will that retain all commit histories, branches, etc?

@ScottBeeson commented on GitHub (Mar 18, 2019): Okay, I guess I'll try that. So basically, I make sure my repo is up-to-date from my old server. I create a new Gitea repo. I change the remote on my local machine to the new Gitea remote. Then I push. Will that retain all commit histories, branches, etc?
Author
Owner

@zeripath commented on GitHub (Mar 18, 2019):

git push --mirror new-remote, use all, tags or mirror as appropriate

@zeripath commented on GitHub (Mar 18, 2019): `git push --mirror new-remote`, use all, tags or mirror as appropriate
Author
Owner

@lunny commented on GitHub (Mar 19, 2019):

#6200 also will partial fix this I think.

@lunny commented on GitHub (Mar 19, 2019): #6200 also will partial fix this I think.
Author
Owner

@ScottBeeson commented on GitHub (May 7, 2019):

I ended up creating empty repos on the new Gitea server and then overwriting the folder with the repos from the old server. This seems to work without any issue.

@ScottBeeson commented on GitHub (May 7, 2019): I ended up creating empty repos on the new Gitea server and then overwriting the folder with the repos from the old server. This seems to work without any issue.
Author
Owner

@stale[bot] commented on GitHub (Jul 7, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jul 7, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3067