That's when you buy an uninterruptible power supply (UPS).
But even an UPS can fail, we have everything plugged into UPS in our workplace and every once in a while an UPS beeeeeeeeeeeeeeeeeeps.
Worst part was the power only went off for like 5 seconds, just long enough to lose everything
Time for new kids
@Poryg Yeah, but a UPS significantly decreases the chance of data loss, even if they aren't 100% reliable (nothing is really).
Learned from my mistakes and now I'm much more careful... save a lot more frequently and have to auto backups to 2 separate drives
Separate names with a comma.