Missing files in local OneDrive folder – how to restore them

Today things started acting up on my computer, and I traced the cause to missing files in my OneDrive folder, where I keep some configs files, like for example .bashrc. A lot of files were missing, and naturally I was scared that they had been removed online too, but after checking at https://onedrive.live.com I could at least calm down regarding that.

I searched online for my problem, and besides finding other people with the same unsolved problem, I also saw lots of posts about the recycle bin, and when I looked there, I found my missing files! Trying to restore some of them, only resulted in lots of sync errors, though.

To cut a too long story short, the problem was this: for some reason most of my folders had been unchecked in the “Choose folders” setting. Checking the proper folders there made the sync start and my missing files started reappearing. Phew! I moved the files with sync errors to a temporary folder and that took care of the error messages.