date | title | slug | weight | toc | draft | menu |
---|---|---|---|---|---|---|
2016-12-01T16:00:00+02:00 | Upgrade from Gogs | upgrade-from-gogs | 10 | true | false | [{sidebar [{parent upgrade} {name From Gogs} {weight 10} {identifier upgrade-from-gogs}]}] |
Gogs, version 0.9.146 and older, can be easily migrated to Gitea.
There are some basic steps to follow. On a Linux system run as the Gogs user:
gogs backup
. This creates gogs-backup-[timestamp].zip
file
containing all important Gogs data. You would need it if you wanted to move to the gogs
back later.1.0.x
version. Migrating from gogs
to any other version is impossible.gogs/custom/conf/app.ini
to gitea/custom/conf/app.ini
.templates, public
from gogs/custom/
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
.1.1.4
→ 1.2.3
→ 1.3.4
→ 1.4.2
→ etc ) to migrate database.Rewrite all update hook of repositories
.Rename gogs-repositories/
to gitea-repositories/
Rename gogs-data/
to gitea-data/
In 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
Verify by starting Gitea with gitea web
gitea
versionAfter successful migration from gogs
to gitea 1.0.x
, it is possible to upgrade to the recent gitea
version.
Simply download the file matching the destination platform from the downloads page
and replace the binary.
gitea/custom/templates
folder, try moving the templates causing the errors away one by one. They may not be
compatible with Gitea or an update.Update the appropriate file from gitea/contrib with the right environment variables.
For distros with systemd:
/etc/systemd/system/gitea.service
sudo systemctl enable gitea
sudo systemctl disable gogs
For distros with SysVinit:
/etc/init.d/gitea
sudo rc-update add gitea
sudo rc-update del gogs