2017-11-26 16:44:32 -05:00
|
|
|
---
|
|
|
|
date: "2016-12-01T16:00:00+02:00"
|
|
|
|
title: "Upgrade from Gogs"
|
|
|
|
slug: "upgrade-from-gogs"
|
2023-07-25 23:53:13 -05:00
|
|
|
sidebar_position: 101
|
2020-12-09 01:47:06 -05:00
|
|
|
toc: false
|
2017-11-26 16:44:32 -05:00
|
|
|
draft: false
|
Refactor docs (#23752)
This was intended to be a small followup for
https://github.com/go-gitea/gitea/pull/23712, but...here we are.
1. Our docs currently use `slug` as the entire URL, which makes
refactoring tricky (see https://github.com/go-gitea/gitea/pull/23712).
Instead, this PR attempts to make future refactoring easier by using
slugs as an extension of the section. (Hugo terminology)
- What the above boils down to is this PR attempts to use directory
organization as URL management. e.g. `usage/comparison.en-us.md` ->
`en-us/usage/comparison/`, `usage/packages/overview.en-us.md` ->
`en-us/usage/packages/overview/`
- Technically we could even remove `slug`, as Hugo defaults to using
filename, however at least with this PR it means `slug` only needs to be
the name for the **current file** rather than an entire URL
2. This PR adds appropriate aliases (redirects) for pages, so anything
on the internet that links to our docs should hopefully not break.
3. A minor nit I've had for a while, renaming `seek-help` to `support`.
It's a minor thing, but `seek-help` has a strange connotation to it.
4. The commits are split such that you can review the first which is the
"actual" change, and the second is added redirects so that the first
doesn't break links elsewhere.
---------
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-04-27 22:33:41 -05:00
|
|
|
aliases:
|
|
|
|
- /en-us/upgrade-from-gogs
|
2017-11-26 16:44:32 -05:00
|
|
|
menu:
|
|
|
|
sidebar:
|
2023-03-23 10:18:24 -05:00
|
|
|
parent: "installation"
|
|
|
|
name: "Upgrade From Gogs"
|
2023-07-25 23:53:13 -05:00
|
|
|
sidebar_position: 101
|
2017-11-26 16:44:32 -05:00
|
|
|
identifier: "upgrade-from-gogs"
|
|
|
|
---
|
|
|
|
|
|
|
|
# Upgrade from Gogs
|
|
|
|
|
2018-01-08 17:48:42 -05:00
|
|
|
Gogs, version 0.9.146 and older, can be easily migrated to Gitea.
|
2017-11-26 16:44:32 -05:00
|
|
|
|
2018-01-08 17:48:42 -05:00
|
|
|
There are some basic steps to follow. On a Linux system run as the Gogs user:
|
2017-11-26 16:44:32 -05:00
|
|
|
|
2018-02-22 07:55:26 -05:00
|
|
|
* Create a Gogs backup with `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.
|
2023-06-20 22:11:17 -05:00
|
|
|
* Download the file matching the destination platform from the [downloads page](https://dl.gitea.com/gitea/).
|
2018-02-22 07:55:26 -05:00
|
|
|
It should be `1.0.x` version. Migrating from `gogs` to any other version is impossible.
|
2017-11-26 16:44:32 -05:00
|
|
|
* Put the binary at the desired install location.
|
|
|
|
* Copy `gogs/custom/conf/app.ini` to `gitea/custom/conf/app.ini`.
|
2018-01-08 17:48:42 -05:00
|
|
|
* Copy custom `templates, public` from `gogs/custom/` to `gitea/custom/`.
|
|
|
|
* For any other custom folders, such as `gitignore, label, license, locale, readme` in
|
|
|
|
`gogs/custom/conf`, copy them to `gitea/custom/options`.
|
2017-11-26 16:44:32 -05:00
|
|
|
* Copy `gogs/data/` to `gitea/data/`. It contains issue attachments and avatars.
|
|
|
|
* Verify by starting Gitea with `gitea web`.
|
2018-01-08 17:48:42 -05:00
|
|
|
* Enter Gitea admin panel on the UI, run `Rewrite '.ssh/authorized_keys' file`.
|
2019-01-10 22:58:28 -05:00
|
|
|
* Launch every major version of the binary ( `1.1.4` → `1.2.3` → `1.3.4` → `1.4.2` → etc ) to migrate database.
|
2018-01-08 17:48:42 -05:00
|
|
|
* If custom or config path was changed, run `Rewrite all update hook of repositories`.
|
2017-11-26 16:44:32 -05:00
|
|
|
|
2018-08-25 01:47:47 -05:00
|
|
|
## Change gogs specific information
|
2017-11-26 16:44:32 -05:00
|
|
|
|
|
|
|
* Rename `gogs-repositories/` to `gitea-repositories/`
|
|
|
|
* Rename `gogs-data/` to `gitea-data/`
|
2018-01-08 17:48:42 -05:00
|
|
|
* In `gitea/custom/conf/app.ini` change:
|
2017-11-26 16:44:32 -05:00
|
|
|
|
2018-08-25 01:47:47 -05:00
|
|
|
FROM:
|
|
|
|
|
|
|
|
```ini
|
|
|
|
[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:
|
|
|
|
|
|
|
|
```ini
|
|
|
|
[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
|
|
|
|
|
2020-01-31 08:42:45 -05:00
|
|
|
After successful migration from `gogs` to `gitea 1.0.x`, it is possible to upgrade `gitea` to a modern version
|
|
|
|
in a two steps process.
|
|
|
|
|
2023-06-20 22:11:17 -05:00
|
|
|
Upgrade to [`gitea 1.6.4`](https://dl.gitea.com/gitea/1.6.4/) first. Download the file matching
|
|
|
|
the destination platform from the [downloads page](https://dl.gitea.com/gitea/1.6.4/) and replace the binary.
|
2020-01-31 08:42:45 -05:00
|
|
|
Run Gitea at least once and check that everything works as expected.
|
|
|
|
|
2023-07-25 23:53:13 -05:00
|
|
|
Then repeat the procedure, but this time using the [latest release](https://dl.gitea.com/gitea/@version@/).
|
2018-02-22 07:55:26 -05:00
|
|
|
|
2019-10-28 17:37:29 -05:00
|
|
|
## Upgrading from a more recent version of Gogs
|
|
|
|
|
2023-02-06 01:37:18 -05:00
|
|
|
Upgrading from a more recent version of Gogs (up to `0.11.x`) may also be possible, but will require a bit more work.
|
|
|
|
See [#4286](https://github.com/go-gitea/gitea/issues/4286), which includes various Gogs `0.11.x` versions.
|
|
|
|
|
|
|
|
Upgrading from Gogs `0.12.x` and above will be increasingly more difficult as the projects diverge further apart in configuration and schema.
|
2019-10-28 17:37:29 -05:00
|
|
|
|
2018-08-25 01:47:47 -05:00
|
|
|
## Troubleshooting
|
2017-11-26 16:44:32 -05:00
|
|
|
|
2018-01-08 17:48:42 -05:00
|
|
|
* 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.
|
2017-11-26 16:44:32 -05:00
|
|
|
|
2018-08-25 01:47:47 -05:00
|
|
|
## Add Gitea to startup on Unix
|
2017-11-26 16:44:32 -05:00
|
|
|
|
2021-05-04 11:16:23 -05:00
|
|
|
Update the appropriate file from [gitea/contrib](https://github.com/go-gitea/gitea/tree/main/contrib)
|
2018-01-08 17:48:42 -05:00
|
|
|
with the right environment variables.
|
2017-11-26 16:44:32 -05:00
|
|
|
|
2018-01-08 17:48:42 -05:00
|
|
|
For distros with systemd:
|
2017-11-26 16:44:32 -05:00
|
|
|
|
|
|
|
* 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`
|
|
|
|
|
2018-01-08 17:48:42 -05:00
|
|
|
For distros with SysVinit:
|
2017-11-26 16:44:32 -05:00
|
|
|
|
|
|
|
* 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`
|