Default auto-generated dirs removed after reboot


Something strange happened, I don’t quite understand what.
I had a power surge, after which an automatic reboot. When I logged into my user account, I noticed that my wallpaper had changed… So strange, I thought, I went to change back and found that there were no old wallpapers, after that, I noticed that there are no dir (it was a single) on the desktop…
After I realized that I have all old files in the user’s root, but those dirs that are automatically created (Desktop, Documents, Downloads, etc…) are empty but Pictures, Videos, and maybe smth other was untouched.
I can’t understand what’s going on. Looks my user group was gone or smth like this…
After 5 minutes of freaking out I decided to look for old files with find and found them in my home directory.
So, all files and dirts from automatically generated ones have moved to the user’s root, and new ones empty have been created in their place.

My question are - What was it? Can I somehow return everything back to its place without manual sorting? What else could have changed in my system theoretically, which I don’t know about yet?

p.s. I can boot with live USB maybe at first time, it was inserted into PC, but all my disk was mounted after boot.

This causes weird behavior on the filesystem - especially during data write.

You are lucky the files are still there - at least the majority.

There is no way of deducting what has happened and therefore no explanation - any attempt to explain would be guess work - and guess leads to more questions which cannot be answered.

If power issues are frequent - your best bet is to invest in an UPS to provide surge protection and emergency power while you shut down your system.

Thanks for the answer.
Well it doesn’t sound very well… Power issues don’t happen often, and I have not previously observed any special problems if they rarely happened. Well, investing in an UPS is a good idea and one that might be worth considering.

And you may think about using a resilient filesystem

  • We did use (15 years ago) jffs2 for our devices
  • Since a few years we do use btrfs for our devices

But there are other fs which are resilient, and may fit in your case.