Prevent deleting local files when resyncing

Hello there. Due to a hard drive crash I lost some files of my account.
Now I have all files in the cloud also locally synced and I’d like to be sure that when I resync that it considers my local state to be the wanted state. If possible I’d like to avoid having to reupload everything as it’s several GBs with a slow internet connection.

So in short how do I make sure that all local files will end up on the server after some random files were deleted on the server (from the file system. No files were deleted through the webinterface)

What I would in this situation is upload the local files with winscp and then use occ files:scan, so Nextcloud is aware of what files are in the filesystem.
Not the greatest idea, but it’s what I have actually done 4 or 5 times. Let’s hope someone has a better procedure.