Nextcloud transfer to another instance


i have an iocage installation that was installed in 2018 (don’t know the version) on a freenas. After freenas crashed, i started the instance on truenas, but it is not working anymore (502 err), i can see that the files are there and mysql working.
Is there a way to move all the files and DB and configs to another fresh nextcloud instance?

You need the same nextcloud version. Or make fresh install and move only the data without database e.g. shares.