Move from hdd on ncp to nextcloud with new ssd

Current NC
Nextcloudpi version : NCP 20.0.4,
hardware: raspberry pi 4
PHP version (eg, 7.4): 7.4.33
External hdd

New NC
Nextclound hub 7 on raspberry pi 5
new external SSD

The issue you are facing:


What is the best route to move data from nextcloudpi 20.0.4, to a new install of nextcloud on a pi5. This should include copying original data from a external hdd to a brand new external SSD, ideally with same permissions.

I know there are a lot of tutorials and I have had a few attempts to moving to a new external drive but that always ended in failure, including somehow destroying a new SSD.

Current NCP versions is v1.53.1
On Debian 11
supporting NC 27.1.6 with PHP v8.1

I’d start with a fresh install and simply upload all the files from my PC, you can also use rsync to copy them and run fix-permissions and nc-scan using ncp-config or ncp-web.