# A Better Gitlab Migration

**URL:** <https://forum.gitea.com/t/a-better-gitlab-migration/5687>\
**Category:** Gitea Usages\
**Created:** [August 9, 2022, 2:47pm UTC](https://forum.gitea.com/t/a-better-gitlab-migration/5687 "2022-08-09T14:47:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelquigley](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/michaelquigley/32/2927_2.png) [@michaelquigley](https://forum.gitea.com/u/michaelquigley)\
**Post date:** [August 9, 2022, 2:47pm UTC](https://forum.gitea.com/t/a-better-gitlab-migration/5687/1 "2022-08-09T14:47:49Z")

</div>

I’ve got a large personal Gitlab server that I’m moving over to Gitea. I’ve got a bunch of migration infrastructure sketched in and mostly working for my needs. I’m using the Gitlab and Gitea web APIs to do the migration.

Is there any sort of low-level interface to Gitea database? Using the API calls throws away all of the dates and timestamps of the history (issues, etc.). If I could read the Gitlab API and then write to the Gitea database directly (ideally through a golang persistence API or similar), then I could preserve a lot of that temporal data.

Might also be useful for other types of future migrations if there were an approach here. I haven’t dug into the Gitea codebase yet to investigate. I wanted to see if anyone had any thoughts here first.

I’m an experienced golang developer and would be happy to make my Gitlab migration tooling available if I get it to a useful place.

---

<div class="post-metadata">

**Author:** ![michaelquigley](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/michaelquigley/32/2927_2.png) [@michaelquigley](https://forum.gitea.com/u/michaelquigley)\
**Post date:** [August 26, 2022, 2:45pm UTC](https://forum.gitea.com/t/a-better-gitlab-migration/5687/2 "2022-08-26T14:45:44Z")

</div>

It’s embarassing, but when I started working on this migration, I hadn’t yet found the “+ Migration” tools in the top menu bar in Gitea.

Other than some issues with colliding primary keys on Gitlab MRs/Issues ([gitlab migrate mergerequests+issues fail · Issue #13884 · go-gitea/gitea · GitHub](https://github.com/go-gitea/gitea/issues/13884)), this is working really well for me.

Fortunately, for the stuff that I’m migrating, keeping the Gitlab MRs is not super important.
