I already asked in the Nextcloud forum https://help.nextcloud.com/t/how-to-update-ucs-app-nextcloud/48513 how to update the Nextcloud app.
Currently, we use 12.0.6. We last upgraded from 12.0.4 which coincidentally also was our first update. There, we lost all config because no one told us to expect this kind of upgrade behaviour. At least we lost no data as we symlinked /var/lib/univention-appcenter/apps/nextcloud/data somewhere else, but we had to restore the symlink afterwards because someone thought it was a good idea to delete /var/lib/univention-appcenter/apps/nextcloud/data on upgrade and recreate it afterwards.
In my opinion it shouldn’t be that we users of UCS have to protect our data from UCS when upgrading. User data and config should never get touched in case of an upgrade or removal.
Compare to apt: If I “apt upgrade” the old package gets removed and the new one installed. On removal, dpkg checks if any config files were modified and offers to replace or keep them. If I “apt upgrade libreoffice” nobody would expect to have removed all LibreOffice documents.
Yes, we are asked to backup config and data, but the more sensible approach would be for the upgrade scripts to just backup those for the admin. The best way would be to not touch those at all. Nobody cares if there are remnants of config and files in the filesystem upon removal of the app. Just offer to remove them, too, if the admin decides to.
So, what’s the right way to update Nextcloud, then? At the moment, with the current state of updating as I understand it, it’s not worth installing the app, as I have comparatively the same amount of hassle when installing Nextcloud manually.