date: “2016-12-01T16:00:00+02:00” title: “Upgrade from Gogs” slug: “upgrade-from-gogs” weight: 10 toc: true draft: false menu: sidebar:
parent: "upgrade"
name: "From Gogs"
weight: 10
identifier: "upgrade-from-gogs"
Gogs versions up to 0.9.146 (db schema version 15) can be smoothly upgraded to Gitea.
There are some steps to do so below. On Unix run as your Gogs user:
gogs dump
. This creates gogs-dump-[timestamp].zip
file containing all your Gogs data.gogs/custom/conf/app.ini
to gitea/custom/conf/app.ini
.templates, public
in gogs/custom/
copy them to gitea/custom/
.gitignore, label, license, locale, readme
in gogs/custom/conf
copy them to gitea/custom/options
.gogs/data/
to gitea/data/
. It contains issue attachments and avatars.gitea web
.Rewrite '.ssh/authorized_keys' file
, then run Rewrite all update hook of repositories
(needed when custom config path is changed).gogs-repositories/
to gitea-repositories/
gogs-data/
to gitea-data/
gitea/custom/conf/app.ini
change:FROM:
[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
TO:
[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
gitea web
gitea/custom/templates
folder, try moving the templates causing the errors away one by one. They may not be compatible with Gitea.Update the appropriate file from gitea/contrib with the right environment variables.
For distro’s with systemd:
/etc/systemd/system/gitea.service
sudo systemctl enable gitea
sudo systemctl disable gogs
For distro’s with SysVinit:
/etc/init.d/gitea
sudo rc-update add gitea
sudo rc-update del gogs