Migration from digitalocean.com to hetzner.com

My YunoHost server

Hardware: Cloud machine on digitalocean.com
YunoHost version:
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Dear Suppporters

I’d like to migrate from digitalocean to hetzner.

Services running: Vaultwarden (upgraded from bitwarden), Nextcloud, Synapse (Matrix)

As you may have noticed, I am not a IT Professional.

Should it work to make a Backup on the old machine and to restore it on the new one?

I think that should work if you are using the same domains.

1 Like

I use a noho.st domain from Yunohost.

Ok, I think you should test then!

  1. Make backups on old VPS and download locally
  2. Shut down old VPS
  3. Install YH on new VPS (you have to release your subdomain first, see forum)
  4. Upload backups to new VPS
  5. Install apps from backups on new VPS

I think this should be it, lets test.

edit: Domain recovery here - Nohost domain recovery - Suppression de domaine en nohost.me, noho.st et ynh.fr

1 Like

“System Configuration”, “User Data” and “Mail” I’m not going to restore, right?

I “always” (well, it’s not something I do daily, but more between five and ten) restore everything.
I am not quite sure which data resides where, but:

  • system configuration: your domains, users, groups, etcetera
  • user data: I guess home directories of users
  • mail: the email (with IMAP the mail is not on your computer or telephone, but stays on the server)

To be sure, shut down as in ‘power off’, not (yet) ‘cancel contract’ :stuck_out_tongue:

Out of interest: What makes you move?

1 Like

It’s much cheaper.

1 Like

Correct. I have never recover from those however…

Good comment! :sweat_smile:

1 Like

Started the process - I keep waiting for the domain to be released.

Can I leave the old server running while waiting for the domain to be released?
I guess the only problem is, that it won’t be accessible anymore.

yeah, that should be ok. You will lose connection when domain is “removed”.

1 Like

The admin interface will still be available via the IP.

If, for whatever reason, you’d need to access the user pages or apps, you can add the domain and the IP of the DO-server in your hosts-file (/etc/hosts on Linux, findable on other OS’s). When you do, don’t forget to take the line away when you want to access the new server at Hetzner.

Of course, as long as you are still waiting for the noho.st-domain to be released, you can use the same ‘trick’ to access the user pages and apps on your new server.

1 Like

So I’ll be able to make a backup after the domain was released, right?

Do I understand this right: After the domain will be released, I’ll still be able to access the user pages, if I add the domain in my hosts file?

The hosts file in a local machine/client, not the server, right?

Yes, correct on both counts.

My hosts file on my (Linux) desktop looks like:

$ cat /etc/hosts       localhost.localdomain localhost
# osba.nl
# online.osba.nl online
# gialinh.nl
#fe80::b2de:ebff:fe5a:2668 gialinh.nl
#  matrix.osba.nl

Notice the ‘#’ in front, to disable the entry for now.

It is indeed on your local machine, the one that is going to make a connection to your Yunohost. I imagine the file is in the same location on Mac; for Windows it is in a subdirectory (also …/etc/) of the windows-system dir; for Android it is in /system/etc/hosts. Some routers also have the option to manually override DNS results (I guess it internally changes the router’s hosts file) Go wild! :stuck_out_tongue:

1 Like

Good to know - I made an entry in my hosts file with the DO-IP and surfdo.noho.st. So I can access the DO apps if something fails and somehow “manually” transfer the data from each app/service.

The release of the domain could take days I guess.

Incredible support wpk! I’ll send you a christmas present :yum:

Hahaha :chocolate_bar:

Keep in mind that this only will give access to the apps that are configured for the surfdo.noho.st domain. Yunohost will recognize the domain/folder you want to visit, and forward you to the app that is configured for that location.
If your regular place of your blog is surf.noho.st/blog, then the host file needs to have surf.noho.host.
You could create two entries (one for the DO IP, and one for the Hetzner IP), and put ‘#’ in front of the one you do not want to use.
Another option is to add on the old Yunohost on DO a domain do.surf.noho.st (after you made the backups), and move the applications on that server from the old domain to the do… domain. Then you can have do.surf.noho.st in your hosts file, and it will work together with your regular domain for the new VPS.

1 Like

This should work after the domain is released, shouldn’t it? My Point is that I want to have access to the old DO server (admin+apps) after the yunohost team released my domain.

Yes, indeed. This way your computer knows where to find do.surf.noho.st, and that way your (old) Yunohost can interpret your request and find the app(s) at that domain.

1 Like

The release of the yunohost domain seems to take weeks to be done.

I’m thinking of migrating to a new yunohost domain.

I’ve set up a new server on Hetzner.
My plan: Adding the new domain on the old DO server (as an existing one), assigning the apps to this new domain, making a backup, restoring it on the new server after having set up the new domain in the post installation process.

I’m a little worried about the bitwarden access and synapse backup. Worst case I have exported the bitwarden and I’ll have to set up all four user and restore it’s data via import function. The synapse (chat) data will be lost in worst case which is a pity but not more. Nextcloud data works well over manual restore within the app.

What are your thoughts about this?

Would that domain not face the same problem as your current domain? Does Yunohost not automatically register the domain for that server when you add it? (I should try it once!)

I have moved installations a bit, from server to server and from domain to domain, but not both at the same time and not all kinds of applications.
When the app configuration has an option to change the domain, you should be OK.

  • Synapse has the ‘change URL’ setting, that should work (but your Matrix account will be another one)
  • Nextcloud also has the ‘change URL’ setting, you’ll have to change the synchronisation settings of your client apps
  • I haven’t used Bitwarden; export + import should work as a fallback.

Is the new sever already set up with the old name, waiting for it to be released? Or are you waiting with the installation till it can go ahead?

Another option, depending on the savings you make from the switch, you could consider is registering your own domain. The .eu-domains are sometimes on offer for less than 15 Euro/10 years; .nl-domains are about 5 Euro/year. It does not really have benefits over a noho.st domain, apart from maybe a chance to find a shorter name and a bit more control. (Disadvantages: less private, higher price, and the same change-of-address as when changing to another noho.st domain)

1 Like