Delete corrupted files on server such that the client will resync them

Nextcloud version (eg, 20.0.5): 28.0.2
Operating system and version (eg, Ubuntu 20.04): @ openSUSE MicroOS
Apache or nginx version (eg, Apache 2.4.25): 2.4.57 (nextcloud:28-apache container)
PHP version (eg, 7.4): 8.2.16 (nextcloud:28-apache container)

The issue you are facing:

Unfortunately, tonight’s regular backup failed with some I/O errors. The following btrfs scrub revealed a few files with checksum errors, all of them inside Nextcloud’s data directory (apparently created yesterday - so no backup yet). Luckily, all of these files should still be available on the client that synced them to the Nextcloud.

I would like to get rid of the corrupted files (at the filesystem level) and let the client resync them to my Nextcloud.

I know that I can delete them and let occ do a rescan of the files inside the affected directory, which should make Nextcloud aware that they were removed. However, I am unsure regarding the exact behavior related to syncing after doing this. I see two reasonable behaviors here, one I would like to see and another one I would really like to avoid:

  1. The client will see that the affected files do not exist on the Nextcloud and upload them again (this is what I want to happen!)
  2. The client will see that the affected files were deleted and also delete them locally (this is what I want to avoid!)

Can you give me some advice on how I can get rid of the (corrupted) files on the server such that Nextcloud will resync them properly?