Closed LunaTheFoxgirl closed 5 years ago
Copy gitea-repositories
, data
, custom
and dump your databases and paste to your new machine.
Can’t dump database, it is corrupted.
Is there any way to import the raw git repos from gitea-repositories? I don't mind that i'll have to recreate issues and such.
Git repositories are stored on the file system, not in the database. Still the database is used for displaying information on the web interface.
I had a similar issue a few weeks ago. I moved Gitea to another server and forgot to adjust the database configuration. The old server was shut down and my database was lost.
I still had all my repositories on the file system and restored the database by creating a new repository via the web interface and restored the old repository files. It took me some time to figure out that Gitea uses Git hooks to retrieve the changes from commits and show the files on the web interface.
At least that worked for me, running Gitea in a Docker container...
I went into the folder with the repositories and did this for each repository I wanted to restore:
mv my-repository.git my-repository.git-bak
rm -rf my-repository.git
cp -R my-repository.git-bak my-repository.git
chown -R git:git my-repository.git
chmod -R +x my-repository.git/hooks/*
git clone git@my-gitea.com:user/my-repository.git
touch test.txt && git add . && git commit -m "Test" && git push -u origin master
git rebase -i HEAD~2 && git push -f
I've decided to switch back to github for now, though thanks for the suggestion.
I've decided to switch back to github for now, though thanks for the suggestion.
nice.. but that not a solution, that only a workaround... sad
[x]
):Description
Earlier today my gitea server went offline, when i checked at home the server had run out of space, looking in to it; XORM had created a 22 GB log file breaking the database and making the system very unresponsive.
I deleted all the logs and tried to use the database but as stated, it was corrupted.
How can i import the repositories from the old gitea version to the "fresh" version? Since i've had to remove the database.
I have the gitea-repositories folder. ...
Screenshots