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 2.8 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 dump`. This creates `gogs-dump-[timestamp].zip` file
  19. containing all important Gogs data.
  20. * Download the file matching the destination platform from the [downloads page](https://dl.gitea.io/gitea).
  21. * Put the binary at the desired install location.
  22. * Copy `gogs/custom/conf/app.ini` to `gitea/custom/conf/app.ini`.
  23. * Copy custom `templates, public` from `gogs/custom/` to `gitea/custom/`.
  24. * For any other custom folders, such as `gitignore, label, license, locale, readme` in
  25. `gogs/custom/conf`, copy them to `gitea/custom/options`.
  26. * Copy `gogs/data/` to `gitea/data/`. It contains issue attachments and avatars.
  27. * Verify by starting Gitea with `gitea web`.
  28. * Enter Gitea admin panel on the UI, run `Rewrite '.ssh/authorized_keys' file`.
  29. * If custom or config path was changed, run `Rewrite all update hook of repositories`.
  30. ### Change gogs specific information:
  31. * Rename `gogs-repositories/` to `gitea-repositories/`
  32. * Rename `gogs-data/` to `gitea-data/`
  33. * In `gitea/custom/conf/app.ini` change:
  34. FROM:
  35. ```
  36. [database]
  37. PATH = /home/:USER/gogs/data/:DATABASE.db
  38. [attachment]
  39. PATH = /home/:USER/gogs-data/attachments
  40. [picture]
  41. AVATAR_UPLOAD_PATH = /home/:USER/gogs-data/avatars
  42. [log]
  43. ROOT_PATH = /home/:USER/gogs/log
  44. ```
  45. TO:
  46. ```
  47. [database]
  48. PATH = /home/:USER/gitea/data/:DATABASE.db
  49. [attachment]
  50. PATH = /home/:USER/gitea-data/attachments
  51. [picture]
  52. AVATAR_UPLOAD_PATH = /home/:USER/gitea-data/avatars
  53. [log]
  54. ROOT_PATH = /home/:USER/gitea/log
  55. ```
  56. * Verify by starting Gitea with `gitea web`
  57. ### Troubleshooting
  58. * If errors are encountered relating to custom templates in the `gitea/custom/templates`
  59. folder, try moving the templates causing the errors away one by one. They may not be
  60. compatible with Gitea or an update.
  61. ### Add Gitea to startup on Unix
  62. Update the appropriate file from [gitea/contrib](https://github.com/go-gitea/gitea/tree/master/contrib)
  63. with the right environment variables.
  64. For distros with systemd:
  65. * Copy the updated script to `/etc/systemd/system/gitea.service`
  66. * Add the service to the startup with: `sudo systemctl enable gitea`
  67. * Disable old gogs startup script: `sudo systemctl disable gogs`
  68. For distros with SysVinit:
  69. * Copy the updated script to `/etc/init.d/gitea`
  70. * Add the service to the startup with: `sudo rc-update add gitea`
  71. * Disable old gogs startup script: `sudo rc-update del gogs`