Skip to content
This repository was archived by the owner on Dec 2, 2017. It is now read-only.

Update from-gogs.en-us.md #42

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions content/doc/upgrade/from-gogs.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,37 @@ menu:

# Upgrade from Gogs

If you are running Gogs which version is below 0.9.99, you can upgrade Gogs to Gitea smoothly. There are some steps to do below:
If you are running Gogs version 0.9.113 or older, you can upgrade Gogs to Gitea smoothly. There are some steps to do below. Make sure to complete as the gitea user in ~:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like use git user to complete it. I think We should say non-root user.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, made the change to reflect non-root user, that is more logical

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added recommendation from pull request #57 as I tested this and upgraded without issue to Gitea v1.0.0. Consensus seems to be this is supported.


* Stop Gogs
* Copy Gogs `custom/conf/app.ini` to Gitea.
* Copy Gogs `conf/` to `options/` for Gitea.
* If you have more custom content on `custom/` folder, like templates or localization files, you should carrefully merge manually because these files changed on Gitea.
* Copy `data/` folder from Gogs to Gitea. It contains issue attachments and avatars.
* Run Gitea
* Enter Gitea admin panel on the UI, run `Rewrite '.ssh/authorized_keys' file` (caution: non-Gitea keys will be lost) and `Rewrite all update hook of repositories` (needed when custom config path is changed).
* cd ~
* Download your platform specific binary from: https://dl.gitea.io/gitea/1.0.0/
* cp -r gogs gitea
* The custom folder still applies for Gitea, just move gogs/custom/conf (not gogs/custom/conf/app.ini) to gitea/custom/options, this is used to override gitignores, labels, licenses, locales or readmes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data directory is needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lunny, I had cp -r gogs gitea that should copy the data/ folder from gogs to gitea. Do you want me to break that out as a separate line?

* cp -r gogs-repositories/ gitea-repositories (this preserves your data in case something goes wrong, it can be deleted once Gitea is verified working)
* cp -r gogs-data/ gitea-data/ (this preserves your data in case something goes wrong, it can be deleted once Gitea is verified working)
* vim gitea/custom/conf/app.ini (Change gogs specific information:)
* [database]
* PATH = /home/:USER/gogs/data/:DATABASE.db
* [attachment]
* PATH = /home/:USER/gogs-data/attachments
* [picture]
* AVATAR_UPLOAD_PATH = /home/:USER/gogs-data/avatars
* [log]
* ROOT_PATH = /home/:USER/gogs/log
*
* [database]
* PATH = /home/:USER/gitea/data/:DATABASE.db
* [attachment]
* PATH = /home/:USER/gitea-data/attachments
* [picture]
* AVATAR_UPLOAD_PATH = /home/:USER/gitea-data/avatars
* [log]
* ROOT_PATH = /home/:USER/gitea/log
*
* Verify working by running gitea
*
* ~/gitea/gitea web
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write this as a code block

* Enter Gitea admin panel on the UI, run `Rewrite '.ssh/authorized_keys' file` (caution: non-Gitea keys will be lost) and `Rewrite all update hook of repositories` (needed when custom config path is changed).
*
* To update your startup script refer to https://github.com/go-gitea/gitea/tree/master/scripts , these files are not included with the binary on https://dl.gitea.io.