Access nextcloud data after reinstall


I setup my raspberry from scratch and reinstalled nextcloud on it successfully in that way, that I have user accounts and can use all the pannels on the web interface of nextcloud and nextcloudpi. However I would like to reconnect the data I had before on an external usb drive. From my understanding this is set under nextcloudpi/config/nc-datadir. When I set the right directory there it doesn’t take the former one but creates a new one with a timestamp next to it, but certainly that’s not what I want. When trying to access it directly I get rejected due to permission errors owner appears to be www-data.

Can anyone help me out on accessing the data again?

Thanks in advance and kind regards