Migrate Nextcloud to another server after computer breakdown

Hello all,

I was running Nextcloud on an Intel NUC with Debian for several years. Unfortunately, the computer completely broke down with no recovery possible (even BIOS is not accessible, it just doesn’t start). The hard-drive is ok so I managed to recover all the files.

I’ve bought a new Intel NUC and installed Debian. My idea was to install all required services (Apache, MariaDB, PHP, …), download Nextcloud zip from nextcloud.com, and then copy all the files from the previous hard-drive to the new one (including all mysql tables).
That did not work. After trying to solve several issues, I think that now the whole system is a complete mess. I’m thinking of re-installing Debian again and restart the whole thing from the beginning.
What would be the procedure to do it correctly in this case ? I really need this to work as I have not only my documents, but also my contacts, tasks, calendars,…
Any advice would be much appreciated.

Many thanks

Hello,

If am not mistaking, all you need to do is just un-plug your storage from your OLD system and plug that storage in your new system.

Make sure to keep the sequence of drive right, like, drive 0 of old PC should be in drive 0 slot of new PC and so on for rest of the drives.

Nothing else you need to do.

OS will boot right up to new system. You may need to install new drivers, in case your new system is vastly different from old one but as in general, things should work just fine.

Thanks.

OMG! That would be so easy. I didn’t think it would work.
I’ll try today evening when I’m back home and let you know.
One quick question on the meantime : my new hard drive is a 500GB SSD and my old hard-drive is a 1TB HDD.
I’d prefer to keep the new one. What would be the best way to transfer the old system to the new hard-drive ? Would a simple dd command do the trick even if they don’t have the same capacity ?

Read Backup and Restore.

Thats ok. But you must use the same Nextcloud version. Alternatively, you could have used the Nextcloud program’s backup and omitted the ZIP file.

Hello,

There are Disc cloning software, which would clone the whole disk including the boot sectors and make an image file or write directly to another disc.

You may try those.

Simple copy pasting wont work since that wont copy partitioning info, file system or boot sectors.

Thanks.

Yesterday morning, I put my old HDD in the new Intel NUC. It didn’t work. The system didn’t boot at all. I don’t know why.
So I’ve resized the partition on the old HDD to make it the same size as the one on the new SDD, and now I’m using dd to make a copy. I’m not touching the boot sectors or anything because there should already be one on the SDD since I installed Debian on it a couple days ago.
I hope it’ll work but I’m not sure.