Nextcloud transfer to another instance

Hello,

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?
Thanks,
Mircea

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