How to recover database from broken nexcloudpi instance and migrate to new instance

Hey,
I set up nexcloudpi on a raspberry pi. I put nexcloudpi on a microsd card but all my data was on an external hard disk.
I think the sd card got corrupted and I can’t connect to the nextcloudpi instance anymore.
I want now to set up nextcloudpi on a new sdcard.
I took the external harddisk with the data and connected it to my laptop.
I can see the data folder there but it appears empty in my file explorer, although I see almost half of the hard disk space is filled.

I am not sure how the nextcloud datafolders work. Are they encrypted by default or something? Can I access the data any other way.
And how would I best migrate this data to a new nextcloudpi instance?

Best regards

Best would be backup / restore - but you didn’t prepare any backup, did you?

Do you remember, if you configured data directory and database to be on the external usb drive?
(like described in How to configure an external USB drive with NextcloudPi )

Simply what you need to do is mount the hard drive where the data is located, give the necessary permissions and change the config.php to the new folder then just run the command sudo -u www-data php /var/www/nextcloud files:scan User and ready