mirror of
https://github.com/go-gitea/gitea
synced 2024-11-18 07:52:03 +01:00
b63e2e0ded
* 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 go-gitea/gitea#4286, go-gitea/gitea#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 go-gitea/gitea#4286, go-gitea/gitea#3558
3.2 KiB
3.2 KiB
date | title | slug | weight | toc | draft | menu | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2016-12-01T16:00:00+02:00 | Upgrade from Gogs | upgrade-from-gogs | 10 | true | false |
|
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:
- Create a Gogs backup with
gogs backup
. This createsgogs-backup-[timestamp].zip
file containing all important Gogs data. You would need it if you wanted to move to thegogs
back later. - Download the file matching the destination platform from the downloads page.
It should be
1.0.x
version. Migrating fromgogs
to any other version is impossible. - Put the binary at the desired install location.
- Copy
gogs/custom/conf/app.ini
togitea/custom/conf/app.ini
. - Copy custom
templates, public
fromgogs/custom/
togitea/custom/
. - For any other custom folders, such as
gitignore, label, license, locale, readme
ingogs/custom/conf
, copy them togitea/custom/options
. - Copy
gogs/data/
togitea/data/
. It contains issue attachments and avatars. - Verify by starting Gitea with
gitea web
. - Enter Gitea admin panel on the UI, run
Rewrite '.ssh/authorized_keys' file
. - If custom or config path was changed, run
Rewrite all update hook of repositories
.
Change gogs specific information
-
Rename
gogs-repositories/
togitea-repositories/
-
Rename
gogs-data/
togitea-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
Upgrading to most recent gitea
version
After 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.
Troubleshooting
- If errors are encountered relating to custom templates in the
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.
Add Gitea to startup on Unix
Update the appropriate file from gitea/contrib with the right environment variables.
For distros with systemd:
- Copy the updated script to
/etc/systemd/system/gitea.service
- Add the service to the startup with:
sudo systemctl enable gitea
- Disable old gogs startup script:
sudo systemctl disable gogs
For distros with SysVinit:
- Copy the updated script to
/etc/init.d/gitea
- Add the service to the startup with:
sudo rc-update add gitea
- Disable old gogs startup script:
sudo rc-update del gogs