# Fresh gitea install, reuse old repos

**URL:** <https://forum.gitea.com/t/fresh-gitea-install-reuse-old-repos/1008>\
**Category:** Install/Maintain/Configure\
**Created:** [March 14, 2019, 8:48pm UTC](https://forum.gitea.com/t/fresh-gitea-install-reuse-old-repos/1008 "2019-03-14T20:48:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkmill](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@darkmill](https://forum.gitea.com/u/darkmill)\
**Post date:** [March 14, 2019, 8:48pm UTC](https://forum.gitea.com/t/fresh-gitea-install-reuse-old-repos/1008/1 "2019-03-14T20:48:29Z")

</div>

Hello all,

I had a Gitea installed and working on a VM. It was using repos over NFS. However I wanted to reinstall the VM on which Gitea was running, so I did that. I had saved my config files, and I had write a small how-to about installing Gitea.

I reinstalled the VM, and installed Gitea again. It worked perfectly, but I do not know how to import my old existing repos.

I had created the same user in Gitea as it was before. I tried creating a new repo with the same name, but I am getting error that the path already exists. I tryed searching for info, but no success.

How can I reuse my old repos, with their commits, and branches etc. with a new Gitea installation? Or maybe I should have done something before I deleted my old Gitea installation?

My backup plan is to move the existing repos on another file system, create new ones in Gitea and import the code in them, but I guess there is a better way to do that?

Best regards.

PS:  
I guess this cannot be done because mysqldb is brand new, and has no records. Next time i will try to backup the DB first.

For this time, I copied the bare git repositories, made them normal git repos, then created new in Gitea, cloned them and copy/pasted the old content. This way i saved my commits and merges

Anyway… if there is better way, let me know bellow 😃

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [March 16, 2019, 10:36am UTC](https://forum.gitea.com/t/fresh-gitea-install-reuse-old-repos/1008/2 "2019-03-16T10:36:50Z")

</div>

You could find some useful information on [https://docs.gitea.io/en-us/backup-and-restore/](https://docs.gitea.io/en-us/backup-and-restore/)
