Migrating from Trac #3317

Open
opened 2025-11-02 05:07:56 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @bobemoe on GitHub (May 11, 2019).

I'm looking to migrate my issues+wiki from Trac to Gitea and was wondering the best way to go about it?

I have found https://github.com/tracboat/tracboat but it is for migrating to GitLab, do you think it would work or be easily adaptable for use with Gitea? Or has anyone got a better idea?

Thanks :)

Originally created by @bobemoe on GitHub (May 11, 2019). I'm looking to migrate my issues+wiki from Trac to Gitea and was wondering the best way to go about it? I have found https://github.com/tracboat/tracboat but it is for migrating to GitLab, do you think it would work or be easily adaptable for use with Gitea? Or has anyone got a better idea? Thanks :)
GiteaMirror added the type/featuretype/proposal labels 2025-11-02 05:07:56 -06:00
Author
Owner

@bobemoe commented on GitHub (May 19, 2019):

In the end I used this one, https://github.com/trustmaster/trac2github as I'm familiar with PHP than Python. I think it was simpler too, it only needed a few tweaks of URLs and Parameters to make it work with Gitea.

I'm happy. Close if you like, or keep open as it may be a nice feature?

@bobemoe commented on GitHub (May 19, 2019): In the end I used this one, https://github.com/trustmaster/trac2github as I'm familiar with PHP than Python. I think it was simpler too, it only needed a few tweaks of URLs and Parameters to make it work with Gitea. I'm happy. Close if you like, or keep open as it may be a nice feature?
Author
Owner

@lunny commented on GitHub (May 20, 2019):

@bobemoe I think we can just keep it open if someone would like to send a PR to Gitea.

@lunny commented on GitHub (May 20, 2019): @bobemoe I think we can just keep it open if someone would like to send a PR to Gitea.
Author
Owner

@6543 commented on GitHub (Oct 27, 2019):

there is a trac to gogs tool: http://strk.kbt.io/projects/go/trac2gogs maby fork it and integrate it?

EDIT: it interacts with the database direct :( useles

@6543 commented on GitHub (Oct 27, 2019): there is a trac to gogs tool: http://strk.kbt.io/projects/go/trac2gogs maby fork it and integrate it? EDIT: it interacts with the database direct :( useles
Author
Owner

@lunny commented on GitHub (Oct 28, 2019):

@6543 maybe @strk like to contribute it. :)

@lunny commented on GitHub (Oct 28, 2019): @6543 maybe @strk like to contribute it. :)
Author
Owner

@strk commented on GitHub (Oct 28, 2019):

No free cycles, and for our case DB interaction is ok so trac2gogs would do :)

@strk commented on GitHub (Oct 28, 2019): No free cycles, and for our case DB interaction is ok so trac2gogs would do :)
Author
Owner

@stevejefferson commented on GitHub (Sep 21, 2020):

FYI I have recently had the task of migrating a number of Trac projects to Gitea, several of which included multi-page Trac wikis.

To automate this I have built a command line utility which performs a "fairly comprehensive" migration of an entire Trac project to Gitea, including the wiki. While the starting point for this was trac2gogs, this utility has grown to cover a greater scope and the two codebases are now completely diverged.

As with trac2gogs, access to Gitea is via the database however all of the Gitea accesses (including those required by the wiki migration) have been abstracted out so hopefully this might prove a useful starting point should anyone want to produce a more integrated Trac migration in the future.

Having now migrated all of my Trac projects I have little remaining use for the utility myself however have uploaded the code to https://github.com/stevejefferson/trac2gitea in case it proves useful.

@stevejefferson commented on GitHub (Sep 21, 2020): FYI I have recently had the task of migrating a number of Trac projects to Gitea, several of which included multi-page Trac wikis. To automate this I have built a command line utility which performs a "fairly comprehensive" migration of an entire Trac project to Gitea, including the wiki. While the starting point for this was `trac2gogs`, this utility has grown to cover a greater scope and the two codebases are now completely diverged. As with `trac2gogs`, access to Gitea is via the database however all of the Gitea accesses (including those required by the wiki migration) have been abstracted out so hopefully this might prove a useful starting point should anyone want to produce a more integrated Trac migration in the future. Having now migrated all of my Trac projects I have little remaining use for the utility myself however have uploaded the code to https://github.com/stevejefferson/trac2gitea in case it proves useful.
Author
Owner

@haumacher commented on GitHub (Mar 30, 2023):

@stevejefferson 's tool only works for sqlite databases. Providing support for all other gitea-supported databases would mean to rewrite all the access SQL in all dialects. Isn't there an abstraction layer within gitea that allows to manipulate the gitea data structures without directly creating db-dependent SQL? I think of an interface that allows the same functionality as the OpenAPI interface for remote access. This would greatly help when integrating the migration tool into gitea.

@haumacher commented on GitHub (Mar 30, 2023): @stevejefferson 's tool only works for sqlite databases. Providing support for all other gitea-supported databases would mean to rewrite all the access SQL in all dialects. Isn't there an abstraction layer within gitea that allows to manipulate the gitea data structures without directly creating db-dependent SQL? I think of an interface that allows the same functionality as the OpenAPI interface for remote access. This would greatly help when integrating the migration tool into gitea.
Author
Owner

@6543 commented on GitHub (Apr 2, 2023):

Yes ... there is format similar to F3 that is internaly used for ex/im-port repos so you just would have to cover that format

@6543 commented on GitHub (Apr 2, 2023): Yes ... there is format similar to F3 that is internaly used for ex/im-port repos so you just would have to cover that format
Author
Owner

@haumacher commented on GitHub (Apr 2, 2023):

@6543 "format similar to F3" can you please give some more detail/pointer?

@haumacher commented on GitHub (Apr 2, 2023): @6543 "format similar to F3" can you please give some more detail/pointer?
Author
Owner
@6543 commented on GitHub (Apr 2, 2023): https://github.com/go-gitea/gitea/blob/main/services/migrations/restore.go [exampleRepo.tar.gz](https://github.com/go-gitea/gitea/files/11132925/exampleRepo.tar.gz)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3317