Skip to content

How can i switch from gogs to gitea with less pain? #3558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iddm opened this issue Feb 22, 2018 · 27 comments · Fixed by #3559
Closed

How can i switch from gogs to gitea with less pain? #3558

iddm opened this issue Feb 22, 2018 · 27 comments · Fixed by #3559
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@iddm
Copy link
Contributor

iddm commented Feb 22, 2018

Is there any manual for moving the git server from gogs to gitea? I'd like to save all my data which was created in gogs before: users, repoitories, settings, everything.

@charlesreid1
Copy link
Contributor

charlesreid1 commented Feb 22, 2018

You want this: Upgrade from Gogs

@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

Thank you very much!

@iddm iddm closed this as completed Feb 22, 2018
@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

@charlesreid1 The manual is a bit outdated:

  1. There is no gogs dump anymore but gogs backup. It must be run under non-root user.

  2. I have this error during gitea web:

     Failed to initialize ORM engine: migrate: do migrate: Error 1146: Table 'gogs.repo_unit' doesn't exist
    

@appleboy
Copy link
Member

@vityafx What is your gitea version?

@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

@appleboy

$ ./gitea-bin --version
Gitea version 1.4.0+rc1-12-g423c642 built with: bindata, sqlite

@appleboy
Copy link
Member

@vityafx I think you should try the v1.0 version. download from https://dl.gitea.io/gitea/

@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

@appleboy why so old?

@appleboy
Copy link
Member

You should migrate gogs to gitea v1.0 and then upgrade gitea from v1.0 to v1.4

@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

@appleboy this also should be mentioned in the docs then.

@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

@appleboy It works so, confirmed: migrating from gogs to 1.0 gitea and then upgrading the gitea from 1.0 to 1.4. Thanks a lot.

@appleboy
Copy link
Member

@vityafx Nice, we should update the document.

@appleboy
Copy link
Member

@vityafx which version do you download? v1.0.x?

@charlesreid1
Copy link
Contributor

charlesreid1 commented Feb 22, 2018

Documentation file needing updating is here: from-gogs.en-us.md, also in French and Chinese (dir).

@vityafx the first two instructions are probably the ones that need updating. Did gogs still generate gogs-dump-[timestamp].zip?

All: Does the second instruction need changing, or does it actually describe the process that was needed (downgrading to version 1.0, then back up to 1.4)?

  • Create a Gogs backup with gogs dump. This creates gogs-dump-[timestamp].zip file containing all important Gogs data.
  • Download the file matching the destination platform from the downloads page.

@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

@appleboy 1.0.3 version :) Also, I still don't get what is gogs backup for? We don't use it later.

@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

@charlesreid1 I know neither french nor chinese :-D

@appleboy
Copy link
Member

appleboy commented Feb 22, 2018

@vityafx Can you help to update the document? Just only update English document.

@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

@appleboy Yes, I can. But I can only try doing that in english.

@appleboy
Copy link
Member

@vityafx Great. Thank you. Waiting for your PR.

@charlesreid1
Copy link
Contributor

charlesreid1 commented Feb 22, 2018

It would seem that gogs backup commands/options are not particularly well-documented. Not sure if this has been addressed but it doesn't look like it.

As far as how the backup (zip file) is used, that zip file will contain a copy of all checked out repositories, as well as a database of data (mysql or sqlite format, in a .db file). That's the file you specify in the config file line:

PATH = /home/:USER/gitea/data/:DATABASE.db

@charlesreid1
Copy link
Contributor

charlesreid1 commented Feb 22, 2018

Some useful info about this topic at this issue on the same topic: #3487

@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

Review my PR please. I think I added everything what is necessary.

@charlesreid1
Copy link
Contributor

You made your PR against the master branch of your own repo - you should make it against the master branch of the gitea repo!

@iddm
Copy link
Contributor Author

iddm commented Feb 22, 2018

Oh, lol, that github annoys me.

@lunny lunny added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Feb 22, 2018
@nubenum
Copy link
Contributor

nubenum commented Mar 12, 2018

Great. I was able to successfully migrate with these explanations.

However, the "Upgrading to most recent gitea version" section was inserted at the wrong place (the config changes below belong to the section above). Apart from that, I am not sure why one is supposed to first start gitea once and only then adapt the repositories path and the config. I might create another pull request if somebody can clear that up.

I am using Docker. The paths and the procedure for the migration with Docker are slightly different, but I think it's not absolutely necessary to explain it in more detail, this could be left "as an exercise for the reader" :)

EDIT: I'm facing problems similar to gogs/gogs#1916. The default git hooks try to invoke the old gogs executable. Resyncing the hooks didn't help. There are two files in the {pre,post}-receive.d directories, gitea (correct) and *-receive (wrong). Maybe that is the reason why it is recommended to restart gitea twice during migration? Or it's because I was using a newer version of gogs than 0.9.146. (Remedy: find gitea-repositories -path \*-receive.d/\*-receive -delete)

@steliosmilidonis
Copy link

what version of gogs where you on @vityafx ?

@iddm
Copy link
Contributor Author

iddm commented Apr 25, 2018

I am on 1.4 now, why?

@MegaphoneJon
Copy link

@steliosmilidonis and others looking to migrate from gogs to gitea in 2018 - I posted some notes at #4286 about my successful migration from the latest gogs.

deoren added a commit to deoren/gitea that referenced this issue Aug 5, 2018
- Move "Change gogs specific information" FROM/TO steps up
  to just beneath matching section header, adjust indention
  and explicitly specify syntax of code sample to provide
  highlighting

- Adjust header levels to match what appears to be the
  intended level, remove trailing decoration (see below)

- Move "Upgrading to most recent ..." section down, remove
  decoration (section header formatting likely covers this
  well enough already)

refs go-gitea#4286, go-gitea#3558
deoren added a commit to deoren/gitea that referenced this issue Aug 5, 2018
- Adjust indention and explicitly specify syntax of code
  sample to provide highlighting

- Adjust header levels to match what appears to be the
  intended level, remove trailing decoration since
  section header formatting likely covers this
  well enough already

refs go-gitea#4286, go-gitea#3558
techknowlogick pushed a commit that referenced this issue Aug 25, 2018
* Update "Upgrade from Gogs" en-us doc

- Move "Change gogs specific information" FROM/TO steps up
  to just beneath matching section header, adjust indention
  and explicitly specify syntax of code sample to provide
  highlighting

- Adjust header levels to match what appears to be the
  intended level, remove trailing decoration (see below)

- Move "Upgrading to most recent ..." section down, remove
  decoration (section header formatting likely covers this
  well enough already)

refs #4286, #3558

* Update "Upgrade from Gogs" fr-fr doc

- Adjust indention and explicitly specify syntax of code
  sample to provide highlighting

- Adjust header levels to match what appears to be the
  intended level, remove trailing decoration since
  section header formatting likely covers this
  well enough already

refs #4286, #3558
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants