File encryption issue after migration

I migrated Nextcloud files to another server and not have in some, but not all files the following issue when opening in Collabora:

However, the file can be opened normally on my laptop and I can simply upload it through the web interface to replace it.

I did all kinds of weird stuff while migrating, so I cannot put my finger on a possible cause. I downloaded files to my laptop, resorted them, assigned them to new users in the process, re-uploaded them, changed the domain, changed the database … really a lot.

Does anyone know how I could possibly solve the issue completely instead of simply replacing faulty files one-by-one whenever I find one?

I only tried occ files:scan, but that didn’t help.

I am having a strong hypothesis: This conerns only some, but not all files that have been migrated to a group folder.

Did you do it like in the manual? https://docs.nextcloud.com/server/latest/admin_manual/maintenance/migrating.html

You used a full backup → data+database?

So all files outside the group folder are not affected?

Make sure you have a good backup of all data before you do any modifications.

I confirm, using group folders was the issue. I have implemented the backup accordingly.