How to Protect your Web Server from a Power Outage

Ian Morrison Web Developer logo that looks like a circular face with glasses and a beard in centre. A double line above and below logo. Article title 'How to Protect your Web Server from a Power Outage' above logo. Website title 'Ian Morrison Web Developer' below logo.

Introduction

The most important aspect of operating your own web server is to ensure that it is always running. That means keeping the operating system up-to-date by installing the latest pacthes. But also, you have to seriously consider how to protect your web server from a power outage.

You may think that a power cut will only make your websites unavailable for a short period of time and you can live with the outage. However, power cuts can cause more havoc than you may think.

in this article, I willl highlight the issues that power cuts can cause to your web server. I will also provide preventative solutions, so that you can protect your precious websites and hardware.

Invest in an Uninterruptable Power Supply (UPS)

An uninterruptable power supply is essentially a large battery that is connected to your server. It automatically activates and directs power to your server in the event of a power cut. This means you do not get a sudden loss of power and the problems that are assocoated with this loss.

Depending on the length of time that there is a power outtage, you may have to shutdown the server. This is primarily what UPS’s are designed to do. They are not designed to keep your server running indefinitely. Anyone who has worked in I.T. understands that the biggest risk to hardware and data is a sudden shutdown of the system – either from a power surge or an accidental shutdown.

When your UPS activates, then you should take this opportunity to shutdown your server normally. Or at the very least, be aware of how much battery power you have available and shutdown if you are approaching the limit of remaining battery power.

It is normal for UPS’s to offer power surge protection too. This ensures that an overload of power doesn’t destroy installed hardware in your server. But you can always invest in separate surge protectors.

Here are some of the most suitable UPS’s depending on the power requirements of your hardware.

Hardware Redundancy

Sometimes, despite our best efforts, a power cut can damage hardware in your server. There are some ways you can minimise the downtime.

Firstly, you can install the operating system on RAID drives. This is essentially 2 or more drives that are exact duplicates. However, this isn’t simply a backup of one drive to the other. Both these drives would be written to simultaneously as part of normal disk operations. If one of these drives fail, you can swap the broken drive out and still have all your data intact on the functional drive. The new drive will have all the original data written to it upon insertion.

If you have a business grade server, this process is even easier. This is because expensive servers like these support hot-swapping of hard drives, meaning you do not have to power-off the server to insert the new drive. Additionally, use server grade hard drives for better protection.

Keep Your Server Operating System Updated

Why should you worry about keeping your system updated if we are talking about power cuts? The answer is straightforward. It is not uncommon for an operating system to configure updates upon restarting the system. If you haven’t been keeping on top of updates then it is highly likely that you will have an even longer downtime than you would have just from powering down your system and restarting when the power is restored. However, if you have been frequently installing updates and restarting your server at quieter times when you have little traffic, then you minimise disruption.

Have a Mobile Internet Backup

Although the primary aim of using a UPS is to give you time to shut down your server safely. What if you use a low-power server, e.g. a Raspberry Pi, and know your UPS has enough battery power to run your server for days. In all likelihood, you will have lost your broadband during the power cut. However, if you use a backup 4G/5G router (also connected to your UPS), then you can connect to mobile data as a temporary measure to ensure there is no downtime whatsoever on your server. Mobile transmitters are usually miles away and not connected to the same electricity grid at your location.

Have a Backup Plan

Now that you know the damage that a power outage can cause, it is a good idea to have a backup plan for your data. You could either backup your data to a cloud service or you could back it up locally. If you backup your data locally, then you usually want to do this at regular intervals and always consider an offsite storage solution. A power outage isn’t going to ruin a backup but what if there is a flood, fire or theft in your premises? You’ll lose the backup.

Conclusion

If you maintain your own server then I highly recommend installing an uninterruptable power supply. Particularly, if you have high-traffic websites and/or run many websites on the same server. The peace of mind you will get from utilising a UPS, and perhaps even the revenue stream protected by not having your websites down for a poeriod of time, makes this investment worthwhile.

If for example, you run websites with adverts or affiliate links, any downtime means that you are no longer getting paid from any of these sources. When you consider that lost revenue, then the cost of a UPS isn’t particularly prohibitive. Considering the cheapest options start at less than £100 or $130.

Additionally, if you follow the other backup measures outlined in this article, it could save you a time and money in the long run. Nobody knows when disaster may strike your web server, so it is a good idea to be prepared for the worst.

About Me

I hope you have enjoyed this article on the topic of 'How to Protect your Web Server from a Power Outage'. You can read more of my articles by visiting my Blog page. Alternatively, you can check out the rest of my business website, where i offer website design and development, WordPress development, e-commerce development and content editing services.

Please consider making a small donation if you find my content helpful. The extra funds help me maintain this blog. Thank you!

Donate via PayPal

Feel free to link to, and share this article if you have enjoyed it.

Follow me on social media and news platforms.

© Ian Morrison