Lessons Learned from Web Hosting Disaster Recovery

I host websites for friends and family and I am responsible for about 15 websites. In an unfortunate event the web host I was using out of Raleigh, NC “crashed”. Actually, I don’t know what happened but their entire reseller accounts server was blown away and took them 3 days to fully restore. This is absolutely unacceptable. I’ve always prepared for this situation and I got a lot of it right but some of it I got wrong.

Redundant Backups

My backups have backups. Seriously. I never trust the web hosting companies so I’ve always used plugins like Backup Buddy to back up websites to a remote location such as DropBox/Google Drive/S3.

Restoring Databases

It’s easy when I can use SQLyog and copy from host to host. When that’s not an option I’ll do 1 of 2 things.

SQLyog (MySQL Client)

If you have a local copy of the database backed up into individual SQL files, running each script individually will take an eternity. Don’t even bother. SQLYog is great at copying data from one host to another.

phpMyAdmin

phpMyAdmin and import it into the new host. The downside to using this is that phpMyAdmin only allows a max file upload of 50mb.

Backup Buddy’s Import Buddy

I’ve never had an issue using Backup Buddy’s Import Buddy. This tool allows me to take a database snapshot and easily upload it and import it into the new web host. The Import Buddy script even has support for renaming the domain name of the website which must be done with a tool.

Use a Windows 10 Machine on Azure

I have a Windows 10 virtual machine sitting in Azure that I use for emergencies. The download and upload speeds on the backbone are much faster than my home network.

(Home vs Azure VM Download/Upload Speed Test)

Azure Samba File Shares

What if my laptop crashes? I use Samba shares to create network shared drives and share project files for websites with other computers and designers/developers.

NordVPN with a Static IP Address

Using a VPN is just a must these days. Not only does it protect against hackers eavesdropping on your connection and stealing sensitive data, but it also can create a static IP address. For security purposes, I white list IP addresses for MySQL/SSH access.

(NordVPN with Static IP Address)

Cloudflare

I use Cloudflare on my websites because it has incredible features that can mitigate disasters like hacking, web servers crashing and DNS.

(Cloudflare)

Website Monitoring Tools

I use several tools to monitor my websites. I’m not genuinely happy with any of them but it’s crucial to use monitoring tools like UpTimeRobot, and WP Remote. They will give you a heads up if something is wrong.

FYI: Fastest Way to Move a New Host

I thought I would add this, if you have to move from one host to another you can literally export the entire cpanel and import it into the new host. This article is written in the approach that a disaster has happened and that is not an option.

My Dream Solution

I’ve been working on a Terraform and shell script that automates the deployment and creation of a web server. It’s almost done and I will eventually share that. Using services like DigitalOcean I can create droplets that can be torn down and rebuilt with ease.

Floating IP Addresses

To manage the changing IP address DigitalOcean offers a service for floating IP addresses. This makes it easy to move IPs from one box to another.

Detachable Storage

Digital Ocean also has the ability to create detachable storage. This means I can tare down my virtual machine and rebuild it in minutes with Terraform. Then I can re-attach my floating IP address and detachable storage and it will be like new.