From nextcloudplus (v23)-backup to nextcloud-docker (v24)

For years i used nextcloudplus (ncp) from nachoparker.
Thanks man for that!
|NextCloudPi version|v1.47.2|
|nextcloud| []
|NextCloudPi image|NextCloudPi_10-08-21|
|OS|Debian GNU/Linux 11. 5.15.32-v8+ (aarch64)|

Unfortunately the project died, so i installed nextcloud-docker on a faster odroid n2.

I want to backup and restore all the data on my ncp.
The data is on a 128-GB-USB-stick, and the backupscript from nachoparker saved the backup there too.

Like here (Backup — Nextcloud latest Administration Manual latest documentation) mentioned i have a backup from data, database and a copy of the complete /var/www/nextcloud-folder.
So i hope you will agree that the backup is complete.

This is my new device:
Odroid N2
Nextcloud version: 24.0.2
Operating system and version: Armbian
5.10.123-meson64 SMP PREEMPT aarch64 GNU/Linux
Armbian 22.05.4 Bullseye

Now i want to restore the backup but i do not have an idea at all.
Here (Restoring backup — Nextcloud latest Administration Manual latest documentation) is written to drop the database, but how can i connect to the database (mariadb) which is a docker-container too.

When i
mysql -h [server] -u [username] -p[password] -e “DROP DATABASE nextcloud”
the cli says that i have to install mariadb.

I am very new to docker, so i am pretty sure this is the problem.

Can you help me please?

Please start with official migration guide. Basically migration consists of moving config, database, files and (reinstalling) apps to the new server and adopting config files…

to run backup/restore in docker you need to pass the mysql command into docker container, see below command to restore from existing dump… ${MYSQL_ROOT_PASSWORD} is a variable inside of docker container, but might pass you password as well.

docker exec -i <dbcontainername> sh -c 'exec mysql -u root --password=${MYSQL_ROOT_PASSWORD} nextcloud' < /youmountpoint_on_the_host/db_bck.sql

Ok, i will try this.
But I still have a few questions more.
a) Is it right that i have to go in maintenance-mode on the new machine before restoring, too?
b) Do i really have to copy my complete old (v23) nextcloud-folder and overwrite everything in the new (v24) nextcloud-folder? There are so many things in the new config.php that are different to the old installation (IPs, domains, directories).

BTW: The dpcker command seemed to work!

Answer to b)

Copy all files from your Nextcloud instance, the Nextcloud program files, the data files, the log files and the configuration files, to the new machine (See Backup and Restoring backup). The data files should keep their original timestamp (can be done by using rsync with -t option) otherwise the clients will re-download all the files after the migration. Depending on the original installation method and the OS the files are located in different locations. On the new system make sure to pick the appropriate locations. If you change any paths, make sure to adapt the paths in the Nextcloud config.php file. Note: This step might take several hours, depending on your installation.

I edited the paths and domains in config.php but the new nextcloud does not work anymore.
I only have 4 users.
Isn’t it easier (and maybe “cleaner”) to import those 4 users and move their stuff in a working empty nextcloud installation?

backup/restore or migration must be performed at same version. sorry didn’t recognize you are moving between version - you should setup your new installation with NC23 and move/migrate first and upgrade to 24 later

if you have only files this might be the fastest solution. Beware - going this way you loos all additional metadata like shares, comments, calendar, contacts etc…