Hello,
As I'm ending my current server rental and starting another, how to move my Forgejo from one to the other ?
I'm sorry if this was already asked, I looked but I didn't find anything.
Thanks
Hello,
As I'm ending my current server rental and starting another, how to move my Forgejo from one to the other ?
I'm sorry if this was already asked, I looked but I didn't find anything.
Thanks
That's interesting and I don't think this happens quite often, but I think you can frame moving Forgejo between servers as backing it up on the current server and then trying to restore Forgejo from the backup on the other server.
@KaKi87 If you need assistance, it would help a lot to explain your setup, for example the procedure differs between a setup in docker and from binary and depends on the database.
Basically, the steps for a binary installation should look like this:
For docker, it means moving the mounted volumes associated to your container and then starting the same container setup on the new server.
If you face any issues, let us know how we can be of assistance.
I find myself wanting to know the same thing.
I'm moving from a stand alone install, to a docker install. How would I move files that are part of the git?
I suppose I could do a git pull and then a git push
@forgejo-moderation @PlayBoxTech reads like spambot to me.
Thank you for your answers, and sorry for the lack of details, I indeed wanted a generic answer first, which would eventually make its way to the documentation, as I looked there before asking and I think it would be great for people trying to do this in the future to have it there.
I did setup from binary, as that's wh I like about Forgejo : being as simple to install as running a binary next to a con file containing database details. I miss that about new apps. Anyhoo...
backing it up on the current server and then trying to restore Forgejo from the backup on the other server
That's actually what I did, and here's the issue I encountered : release files are no longer downloadable, even though they are listed, and everything else works fine.
Thanks
I'm moving from a stand alone install, to a docker install. How would I move files that are part of the git?
I had this scenario around December 2024. My approach was:
Old machine running Debian Bookworm using the downloaded binary in combination with SystemD and PostgreSQL:
forgejo doctor check all (see https://forgejo.org/docs/v10.0/admin/upgrade/#backup)forgejo manager flush-queuesforgejo dump to generate a archive (I went with the extra option for a .tar.gz to maintain file permissions)pg_dump resp. pg_dumpall with the respective database (or the whole cluster)On the new server running Debian Bookworm using Podman with the rootless OCI, generating SystemD files. Still PostgreSQL as database.
XFG_RUNTIME_DIR is set to the correct value.app.ini settings as needed.I plan to eventually write down a more detailed instruction on my blog.
First back up your Forgejo data from the old server, including the gitea directory (usually located in /var/lib/gitea) and the database (using a tool like mysqldump or pg_dump, depending on your database). Then, set up Forgejo on the new server with the same version, copy your backed-up gitea files to the new server, restore the database, and make sure the configuration file (app.ini) is properly updated with the new server details. After that, start Forgejo and it should work the same as before.
@danielhess219 forgive me for asking: are you a human or an AI?
No due date set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?