I'm admittedly paranoid abou tthat.
I have a backup power supply, just in case the power goes out.
However, it may not be 'big' enough to power the system long enough to shut it down...
I'm always thinking that a back up power supply might be in order. Haven't acted on it yet.