Thanks for your advices.
I figured it out.
Connect to mysql : mysql -u root -p nextcloud
netxcloud -> name of your nextcloud instance (nextcloud in my case)
Commands for dumps (export) :
mysqldump -u root -p nextcloud oc_users > /mnt/oc_users.sql;
mysqldump -u root -p nextcloud oc_addressbooks > /mnt/oc_addressbooks.sql;
mysqldump -u root -p nextcloud oc_accounts > /mnt/oc_accounts.sql;
mysqldump -u root -p nextcloud oc_groups > /mnt/oc_groups.sql;
mysqldump -u root -p nextcloud oc_group_admin > /mnt/oc_group_admin.sql;
mysqldump -u root -p nextcloud oc_group_user > /mnt/oc_group_user.sql;
It will create .sql files in /mnt/ (you can choose any folder on the host, it’s your choice).
Copy those file in your new server in /mnt/ (on the host).
I transfer the files from one to the other via WinSCP.
Commands for the import (via docker-compose) :
docker-compose exec -T db mysql -unextcloud -pXXXXXXXX nextcloud < /mnt/oc_users.sql
docker-compose exec -T db mysql -unextcloud -pXXXXXXXX nextcloud < /mnt/oc_addressbooks.sql
docker-compose exec -T db mysql -unextcloud -pXXXXXXXX nextcloud < /mnt/oc_accounts.sql
docker-compose exec -T db mysql -unextcloud -pXXXXXXXX nextcloud < /mnt/oc_groups.sql
docker-compose exec -T db mysql -unextcloud -pXXXXXXXXnextcloud < /mnt/oc_group_admin.sql
docker-compose exec -T db mysql -unextcloud -pXXXXXXXX nextcloud < /mnt/oc_group_user.sql
db = service name in docker-compose
-unextcloud = user
-pXXXXXXXX = pass
nextcloud = name of the instance
In docker-compose, it matches with the env variables :
- MYSQL_PASSWORD=
- MYSQL_DATABASE=
- MYSQL_USER=
After that, it’s done.
Go in Web-app, all the users account are here and safe, with passwords. No problem to connect with these accounts.
Except one thing. The e-mails are not there.
I’ve found that these users accounts e-mails are in oc_preferences table.
But my dump with that table creates an empty file. Never found why…
Nevermind, I’ve done this manually.
I don’t know how mjoldman had success with e-mails because, they are in oc_preferences table.
It was a detail for me, so nevermind.
No incompatibility between export mysql and import mariadb in my case.