Is there a way to manually copy all repositories from a server that has a failed web service? I just want to recover the repos that were managed with gitea. Gitea was running on a Ubuntu server as a snap. Any help would be appreciated!
Thanks!
Is there a way to manually copy all repositories from a server that has a failed web service? I just want to recover the repos that were managed with gitea. Gitea was running on a Ubuntu server as a snap. Any help would be appreciated!
Thanks!
Your data should be stored in $SNAP_COMMON
, which for Gitea should be /var/snap/gitea/common
. There should be a repositories
directory which contains all of your users’ and organizations’ repositories.
Nothing special is needed to manually copy them, as they’re just stored as normal Git bare repositories which are just files and directories.
Awesome! Found the repos however I don’t seem to be able to see the project files in those directories and when I run a git status it says something about it needing to be in a working tree. Sorry for the lack of knowledge on how this all works. Again THANK YOU for the help!
If they’re git files, they may be hidden since they usually start with a dot. What command are you using to peek at the directory?
After doing some brief research it looks like a bare repo doesn’t have a working directory. Thank you for your insight jake. I did the following to recover project files:
git clone file:///path/to/bare/repo.git
git checkout commit-hash
git checkout branch-name
git checkout tag-name
Hope this helps others.