I have used a UPS (Uninterruptible Power Supply) for many years on my main Macs. If you value your work and cannot afford to lose..