Recover Configuration.yaml from .swp file

Hi everyone!
Yesterday I wanted to change something in my configuration.yaml file but it told me it was in use by some process and something about a .configuration.yaml.swp file. I did a quick Google search (too quick apparently) and it told me to delete this .swp file. Afterwards my configuration.yaml file was empty. I’ve now recovered this .swp file use “TestDisk” successfully but after placing it back my Hassio install won’t work again. It gives me a 404 error. It tried using VIM to recover my original file but it does not see it as a valid .swp file. Does anyone know what I can do to recover my configuration file? I’m running hassio in a docker container on a desktop computer running Ubuntu 19.10.
Thanks!

Recover it from a backup.

I would not have made this forum post if I was smart enough to create backups :smile: . But otherwise, any idea why that .swp file gets made? It looks like something that Hassio would create if you would edit the configuration file in the UI. To my knowledge, this is not a feature that exists at the moment so this is still a mystery to me.

normally you would use “vim -r configuration.yaml” and it would then open the .swp file.

Already tried that, unfortunately, this does not work and gives me this error:

I never use VIM to create or edit files, I only use nano or VSCode to edit files through SSH on my server. So it would seem strange to me that the .swp file is created by VIM

What is “it” in the OP?

The text editor Nano