Secure Migration Process NC old --> new

Hallo Zäme/Everybody

Migration - how is the best way?

Alt
OS Debian 12
HW Zotac - ID82

Linux nextcloud 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64 GNU/Li

PHP 8.2.28 (cli) (built: Mar 13 2025 18:10:30) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.28, Copyright (c) Zend Technologies
with Zend OPcache v8.2.28, Copyright (c), by Zend Technologies

MariaDB:

Welcome to the MariaDB Monitor.
Server version: 10.11.11-MariaDB-0+deb12u1 Debian 12

NextCloud → ‘Version’ => ‘31.0.0.18’,

New

OS: openSUSE Trumbleweed
HW: Zotac Nano
Linux Next 6.15.2-1-default #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:47:59 UTC 2025 (3a37f07) x86_64 x86_64 x86_64 GNU/Linux

PHP 8.4.8 (cli) (built: Jun 6 2025 08:25:15) (NTS
Copyright (c) The PHP Group
Zend Engine v4.4.8, Copyright (c) Zend Technologies
with Zend OPcache v8.4.8, Copyright (c), by Zend Technologies

Welcome to the MariaDB monitor.
Your MariaDB connection
Server version: 11.8.2-MariaDB MariaDB package

NextCloud → ‘Version’ => ‘31.0.6.2’,

What is the best and safest way to perform the migration.

Note: I already had a try of that, but it failed completely by importing a backup(files, data) and dump (DB) from the NC old one to Nextcloud the new one!

After that I had to reinstall and reconfigure everything, which cost me, as a not very knowledgeable person, a lot of time and nerves!!!
I don’t want to make this mistake never again.

Is there a reliable migration process for this?
What happens if I just transfer a DB dump (old NC) to the new cloud and mount the USB disk (files) from the old cloud into the new cloud?

Thanks for any information and idea. I post this in the German Forum too (in German language).

foogy

I think you need the same Nextcloud versions on source and destination. Maybe you can better dump db and zip/unzip all (Nextcloud, configuration, data, …). Maybe you also need the same php version (not tested).

On new installation on destination you find here the correct Nextcloud versions (from your old system) e.g. nextcloud-31.0.0.zip: Index of /server/releases

Also read Nextcloud 31 System requirements .

question
Why have you changed from Debian to openSUSE?

please review topics tagged server_migration and RTFM

All my Workstation/Server working under openSUSE Leap and now NC should take openSUSE too - openSUSE is more stable.

Yes, it could be a solution, but sooner or later I’ve to do some update. This could be a risk. Not the first time that an update crashed.

I’ve install Nexcloud on openSUSE and its running now.
Do you know whats happen when I just transfor db dumb and mount old FS on new NC data dir?