My MacBook restart itself once a day, randomly
(First of all, I'm lucky to have a MacBook. Why? Because it is 8 years old and only now starting to make troubles, and because if PC would have restart itself once a day all my work would have gone forever. macOS kind enough the restart itself from the point we left off)
It's two months now since the first time. In the beginning, it was twice a day or even more, but now it's barely once a day. When my Mac reset itself the next screen is appearing:
Then the Apple logo is showing up, then the Log In screen, but after one sec the Apple logo sowing up again and just then everything is back to normal. At first, I thought its because of a program called BOINC, but it is not.
But Apple Support recommended me to reinstall macOS, but I can't because I don't have a backup device. I've bought AirPort Time Machine throw friends in the US but they are stack there in the meantime and I don't want to buy another backup device at the same price again. Also, I've tried to check via Terminal what was the last action before resetting but the code AS were giving me hasn't shown up anything. Console didn't help either.
So, can someone help me find what causes the reset, and if it's not an app but the macOS, how can I reinstall it without hurting my precious files?
MacBook Pro 13″, macOS 10.15