Nextcloud migration from dead server

Hi there!

I ran a nextcloud installtion on an ubuntu machine which died because of a hardware issue in combination with a failed os upgrade. I dont have a dedicated backup. :frowning:

However, I believe all the nextcloud relevant data should be accessible when pluging in the old drive to a new server? The data directory is on an encrypted separate drive anyway.

Here is what i would like to do:
Set up a server with new hardware.
Install latestest ubuntu lts.
install NC including the maria dB and apache, certificates…

What is the best way to continue from here on? Is there a step by step guide somewhere?
Obviously I cant put the old installation in maintenance mode like foreseen in the official manual:frowning:

Thanks for your help, really appreciated!!

I guess all hard drives of the old server are still running, so you have access to the nextcloud folder, data folder and theoretically database, which was also mysql/mariadb before?

So the nextcloud and data folders can just copied over. To set nextcloud into maintenance, you can manually change the related line in you nextcloud/config/config.php before accessing nc on your new machine.

About the database I am not too sure how to get all that data inside safely to your new machine, as you cannot do a database dump. The best way would be of course to temporarily get the old machine to run and do the database dump. There is this mysql folder somewhere in /var/run/ or something that contains the databases, but I got problems trying to just copy/replace them to a new operating system. Maybe someone elso knows how this can be handled if one just has access to the old hard drive but not the mysql console?

At least I guess it would already make it easier to use the exact same mysql/mariadb version, so no db upgrade need to be done on top.

Thanks, I will try and copy over the DB. But heard there are quite some issues to be expected :confused: lets see.

But I wonder whats the reason that its such a big deal?

Here is where I am (local server):
I replaced the mITX bundle (Mainboard, Ram, CPU) and setup the same OS UBuntu 16.04 as before. Installed the whole Nextcloud package incl MariaDB, Apache with the same version as on the old server.

The data folder lies on a encrypted SATA drive which is already mounted to the new server.

The old server HDD is connected to the new server.

I will probably just start a trial and error session now and simply copying over all webserver, db config, nextcloud to the new installation. DNS, IP addresses etc are all the same…