You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

from-gogs.en-us.md 3.3 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ---
  2. date: "2016-12-01T16:00:00+02:00"
  3. title: "Upgrade from Gogs"
  4. slug: "upgrade-from-gogs"
  5. weight: 10
  6. toc: true
  7. draft: false
  8. menu:
  9. sidebar:
  10. parent: "upgrade"
  11. name: "From Gogs"
  12. weight: 10
  13. identifier: "upgrade-from-gogs"
  14. ---
  15. # Upgrade from Gogs
  16. Gogs, version 0.9.146 and older, can be easily migrated to Gitea.
  17. There are some basic steps to follow. On a Linux system run as the Gogs user:
  18. * Create a Gogs backup with `gogs backup`. This creates `gogs-backup-[timestamp].zip` file
  19. containing all important Gogs data. You would need it if you wanted to move to the `gogs` back later.
  20. * Download the file matching the destination platform from the [downloads page](https://dl.gitea.io/gitea).
  21. It should be `1.0.x` version. Migrating from `gogs` to any other version is impossible.
  22. * Put the binary at the desired install location.
  23. * Copy `gogs/custom/conf/app.ini` to `gitea/custom/conf/app.ini`.
  24. * Copy custom `templates, public` from `gogs/custom/` to `gitea/custom/`.
  25. * For any other custom folders, such as `gitignore, label, license, locale, readme` in
  26. `gogs/custom/conf`, copy them to `gitea/custom/options`.
  27. * Copy `gogs/data/` to `gitea/data/`. It contains issue attachments and avatars.
  28. * Verify by starting Gitea with `gitea web`.
  29. * Enter Gitea admin panel on the UI, run `Rewrite '.ssh/authorized_keys' file`.
  30. * If custom or config path was changed, run `Rewrite all update hook of repositories`.
  31. ## Change gogs specific information
  32. * Rename `gogs-repositories/` to `gitea-repositories/`
  33. * Rename `gogs-data/` to `gitea-data/`
  34. * In `gitea/custom/conf/app.ini` change:
  35. FROM:
  36. ```ini
  37. [database]
  38. PATH = /home/:USER/gogs/data/:DATABASE.db
  39. [attachment]
  40. PATH = /home/:USER/gogs-data/attachments
  41. [picture]
  42. AVATAR_UPLOAD_PATH = /home/:USER/gogs-data/avatars
  43. [log]
  44. ROOT_PATH = /home/:USER/gogs/log
  45. ```
  46. TO:
  47. ```ini
  48. [database]
  49. PATH = /home/:USER/gitea/data/:DATABASE.db
  50. [attachment]
  51. PATH = /home/:USER/gitea-data/attachments
  52. [picture]
  53. AVATAR_UPLOAD_PATH = /home/:USER/gitea-data/avatars
  54. [log]
  55. ROOT_PATH = /home/:USER/gitea/log
  56. ```
  57. * Verify by starting Gitea with `gitea web`
  58. ## Upgrading to most recent `gitea` version
  59. After successful migration from `gogs` to `gitea 1.0.x` it is possible to upgrade to the recent `gitea` version.
  60. Simply download the file matching the destination platform from the [downloads page](https://dl.gitea.io/gitea)
  61. and replace the binary.
  62. ## Troubleshooting
  63. * If errors are encountered relating to custom templates in the `gitea/custom/templates`
  64. folder, try moving the templates causing the errors away one by one. They may not be
  65. compatible with Gitea or an update.
  66. ## Add Gitea to startup on Unix
  67. Update the appropriate file from [gitea/contrib](https://github.com/go-gitea/gitea/tree/master/contrib)
  68. with the right environment variables.
  69. For distros with systemd:
  70. * Copy the updated script to `/etc/systemd/system/gitea.service`
  71. * Add the service to the startup with: `sudo systemctl enable gitea`
  72. * Disable old gogs startup script: `sudo systemctl disable gogs`
  73. For distros with SysVinit:
  74. * Copy the updated script to `/etc/init.d/gitea`
  75. * Add the service to the startup with: `sudo rc-update add gitea`
  76. * Disable old gogs startup script: `sudo rc-update del gogs`