Mysql service import & export in nextcloud

I’m try to migrate a native nextcloud instance to a snap version. It has many users and files. How do I import the data to the mysql database? TIA