Jep, for this issue I created the script, provided by WarHawks link

. You should be able to continue with your Nextcloud on new/reflashed machine, as nothing happened.
I am happy for feedback, if it works flawlessly. It has vast error recognition, so nothing to worry about that. Just recheck the existence of the nextcloud data folder + mentioned backup sql/folder inside, on your external/backup drive.
DietPi-Backup can't be used, as it backups unselectively the whole system drive (+in case userdata), which would at best just recover DietPi v159, on your new v6.0 system, or something in between an break it that way

.
But I have further plans to integrate the backup methods from script to dietpi-backup as a separate option, if it is proven a while to work well. So far implemented it into ownCloud/Nextcloud uninstallation to backup the whole instance in case of accidents.
Happy migration

!