Before upgrading be sure to have a backup.
Enter nextcloud instance:
runagent -m nextcloud1
Edit config.php:
podman unshare nano $(podman volume inspect nextcloud-app-data --format={{.Mountpoint}})/config/config.php
Set version to the current one:
'version' => '30.0.7.2',
Try to upgrade again via occ.
See also Failed update on NS7.9 to NS8 migrated NextCloud - #25 by mrmarkuz