Hi Niels,
Sorry I did not see this message sooner.
Are you aware that you can use S6 to connect to your database and then use the “Backup” feature to create a SQL Dump file that you can then use to seed an S6 Maria DB docker container using the docker-compose project?
How to create a SQL Dump with S6:
https://discourse.specifysoftware.org/t/send-a-backup-to-specify-pc/767
How to seed a Maria DB using the docker-compose project
https://github.com/specify/docker-compositions/tree/production/all-in-one
I am not sure what “optimization” is needed that you are referring to, so perhaps you are trying to do something completely different than the process above which easily allows you to migrate a MySQL DB to MariaDB.
- Matthew