Top 3 reasons why backing up data is important

Black Internal Hdd on Black Surface

You need a reliable backup strategy, whether you’re running an off the shelf NAS to collect family photos, or operating an entire datacenter from your garage. Throughout my time self-hosting my smart home system (and this WordPress blog), I realised that my data security cannot be left to chance.

Countless hours have been spend configuring and fine-tuning these systems — systems that store, among other things, my family’s entire digital photo collection going back to the 1980s.

Last year, I migrated my entire server from an Intel NUC to an Unraid server running on a much more powerful machine. Not only did this allow me to put my 6-core desktop PC to good use, it also added hard drive redundancy, a RAID1 cache consisting of 2x 512GB SSD drives and theability to host virtual machines such as PFSense.

The remainder of this article describes the 3 reasons why I still take backups – despite the fact Unraid’s parity system provides good protection.

Protection from hardware failure

Shortly after migrating to Unraid, the M.2 SSD drive used for 24/7 server use finally corrupted and died. This demonstrates how unpredictable hardware failures can be.

RAID systems provide redundancy to mitigate the failure of individual hard drives. RAID5, for example, provides 1 disk for redundancy, meaning a disk failure can be recovered and the data rebuilt from parity data distributed across the other disks.

Unfortunately, it is not uncommon for disks that were purchased at the same time to fail at roughly the same time as well. Since they are at similar stages in their useful life. Rebuilding a RAID array is an intense stress on the remaining harddrives. Any disk failure during a rebuild process is catastrophic, rendering the entire RAID configuration pointless.

How to reduce the change of failure

Buy brand new NAS hard drives: I invested in three brand new 3TB Western Digital Red NAS harddrives, which offered the best capacity to price ratio at the time.

The best value option in 2021 may be the 4TB or 6TB drive variants. Note that you need at least three drives to take advantage of RAID. It might be worth getting 3 cheaper lower capacity drives (3TB vs 6TB) if that means you can get more drives for hte same price (even if the cost per GB is slightly higher, this is a good tradeoff since drive redudancy is better).

It was important for me to use new NAS drives despite the relatively low work load in my home server.

Configure Unraid to spin down disks when not in use: Unraid is configured to do 95% of all read and write operations on a RAID1 SSD cache. This is good because SSD storage is much faster to support the high file input/output of VMs and Docker services.

The NAS drives are inactive and powered off most of the time. Once a day, Unraids mover process copies all data to the disk array.

Unraid Disk Status

Recovery from natural disasters

In case of a flood or fire, you want to be able to restore your system from an off site backup. I keep a hard drive of my most important data at my parents house. All family photos are backed up on my disk array, an archive drive is keep in storage and at my parents house.

Why do I need extra backups when my disk array takes care of everything? Using Unraid, the risk of harddrive failures is largely mitigated, and off-site backups provide a last-resort to restore data,however, this is not the only reason I take backups.

Protect against human error and misconfiguration

While the RAID array may protect against hardware failures, it cannot help you recover from human mistakes. Misconfiguration and accidents happen very quickly and you don’t realise it until its too late. I speak from personal experience with the following six common scenarios of accidental data deletion:

  1. mounting a Docker volume in the wrong location (parent directory instead of child) resulting in the entire parent directory getting wiped out and overwritten;
  2. overwriting the source directory using the fussy demands of rsync pathing syntax;
  3. Deleting your own data by running a command like rm -rf . in the wrong directory. Or worse, fat-fingering the keys and hitting / (slash) instead of .(period). This is the near-miss that prompted me to write this post!
  4. Applying the wrong permissions to a set of folders that your Docker service can no longer recognises with no way to regain access to data.
  5. Deleting photos in an over-enthusiastic attempt to setup an online photo album application (this never happened but I was very conscious of the fact that it might!)
  6. Using WordPress’s Bulk edit feature to update tags and running into a new bug that overwrites the titles of 20 blog posts. Having lost the original post titles, I was very lucky to have a backup from 7 hours ago to revert back to.

All of these are remediated more gracefully when an up-to-date backup is available. It can not only save your prescious data but also shortcut troubleshooting process, saving you the headache and stress. Just restore and pretend nothing happened.

The last thing you wanna be doing is panicking and googling things like “What are the default nextcloud user directory permissions in linux?”.

By taking a backup before touching any computer system you can walk away without a headache in the worst case scenario. Something as crude as copying a directory and adding your name and date is sufficient.

Should anything go wrong, rename the original directory containing defective data (rename now to investigate what went wrong, delete later) and rename your backup to become the new production directory. Reboot services and you’re back in business.

MY MISSION

This blog started nearly 10 years ago to help me document my technical adventures in home automation and various side projects. Since then, my audience has grown significantly thanks to readers like you.

While blog content can be incredibly valuable to visitors, it’s difficult for bloggers to capture any of that value – and we still have to work for a living too. There are many ways to support my efforts should you choose to do so:

Consider joining my newsletter or shouting a coffee to help with research, drafting, crafting and publishing of new content or the costs of web hosting.

It would mean the world if gave my Android App a go or left a 5-star review on Google Play. You may also participate in feature voting to shape the apps future.

Alternatively, leave the gift of feedback, visit my Etsy Store or share a post you liked with someone who may be interested. All helps spread the word.

BTC network: 32jWFfkMQQ6o4dJMpiWVdZzSwjRsSUMCk6

Conclusion

Did I miss anything? Why do you take backups? How did they save the day? Share your experience in the comments below. There is nothing more relieving than successfully restoring from a backup and no one ever finding out there was a problem!

Related posts

Troubleshooting Intermittent WiFi Issues: Solving “Host Unreachable, No IP Route” Error on Android and NUC Devices

How to Optimize Docker Builds with Nexus OSS for Apt, Maven, Docker and NPM Dependencies

Complete OpnSense Firewall Migration including HAProxy and Acme with Let’s Encrypt: A Detailed Guide for Self-Hosting Enthusiasts

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Read More