A way to move an entire Yunohost to a new server

My server has around 2TB of data and some 20 services including Peertube, Synapse, Friendica or Nextcloud. We would like to move to a new server, but is there a more straight forward way to move? We are talking about databases that are over 100GB in size and hundred of thousands of files…

We also have Borg backups to borgbase.com for everything.

But I wonder what is the easiest to move it all.




install YunoHost in the new server; skip postinstall (or not); install borg_backup; connect it to borgbase and start restoring your server from backups (domains, users, data, apps, multimedia,…)

Well, it should work.

Otherwhise, if possible :

  • Mount an external harddrive on the /home/yunohost.backup/archives/ directory of your “old” instance
  • Manually backup this old instance
  • Install Debian + Yunohost on the new server, skip the post install
  • Mount the external HDD on the /home/yunohost.backup/archives/ directory of the new instance
  • Restore your backup manually

This also should work and might be faster than borgbase.

What I noticed is that Yunohost will fail to restore backups larger than say 10GB especially if we are talking about databases. So say I restore my Synapse backup via borg. That one has a database of 200GB. I do not think I can simply restore this via the Yunohost admin panel. It will more than likely fail.

So yah, I could restore the backup archives from borgbase.com to the new server but for large backups I doubt it will work to restore.

EDIT: What I mean is that I can grab these large backup archives from borgbase.com to the new server, but to restore them seems like something that Yunohost won’t handle well when we are talking about large databases.

What’s the error message? Any logs of failed backup?

I will eventually get a 504 timeout prob from Nginx. I will try these days again and will try to post the full logs.

Try to do it via command line, so there will be no timeout via nginx.
I already made big restoration, without any problem (via a borg mount point)

But a really large backup could take hours to be restored, so do not forget to do it via tmux, just in case the connexion is closed :wink:

Would you be able to give me some more exact instructions please? Or a documentation about your approach?

Yes I should do it via the command line for sure.

Here is the link to borg restauration : BorgBackup | Yunohost Documentation

From what I remember, I did not use this way (create an archive), but borg mount ( borg mount — Borg - Deduplicating Archiver 1.2.6 documentation ), as it was a few years ago, I do not know if YunoHost’s api can still mount a backup not in an archive.

What I did is to mount a specific archive from borg to a folder in the backup folder, with a name as it should (I think the folder name is not important, and that the infos about the backup are all in a file inside).

Thanks. I wish it was an easier way to restore with YNH from external backups sources.

What is the command line to restore an app in yunohost?

Thanks for your tips.

I wonder, after uploading the backup file.

How to restore backup manually? Because without the post installation, there is no admin credential to login in to do the restoration.

I am close to move one Yunohost to another server and I will make a post about all of the process. So stay tuned I’ll post it here too.


Ok I made a post about it here Moving from Contabo to Webdock – TIO - maybe I should not post it directly here since it is quite long. In essence is is super easy thanks to YNH. The most complicated is to figure out with the SSH connections…those gave me a lot of headaches :smiley:

In super short, but I’ll recommend the article:

  1. Get a new VPS with Debian

  2. Install Yunohost on it via SSH

  3. Considering you have Borg backups, install the Borg app via YNH, and connect it to your Borgbase.

  4. Via SSH grab the list of your Borgbase archives, then with another command select the one you want to download. First do so for your YNH config.

  5. Restore your YNH data (configs, users, etc.)

  6. Select your default domain and change the DNS for it.

  7. Proceed to download a new archive and restore it via the YNH backup then change the DNS.

I will move a much bigger server that requires the restoration of hundreds of GB per app…so let’s leave this post open for now.

I still do not know how to restore a backup via the command line? Anyone can help? Is there a yunohost command for that?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.