How to protect your data. RAID IS NOT A BACKUP

This is the first in a series of tutorials aimed to promote healthy habits and security for your data storage. Those tutorials will be linked in the wiki.

Most newcomers to NAS world discover what a RAID array is, and they think that RAID redundancy protect it's data as if it were a backup because if one or more drive fails, you lose nothing, but that is simply not true. We had some threads lately from users who either got malware or lost data for any reason, and it shocked me how many people don't actually have a backup for his data, which they consider important. This post will try to address this issue and educate why backups are not just important, but essential.

 

WHAT RAID IS:

RAID stands for "redundant array of independent disks", and it's essentially a way of storing the same data in several drives, thus improving performance (read/write speed -depending on the RAID type-) and fault tolerance. RAID objective is not to protect your data against drive fail, but to avoid downtime if something happens.

In case of a drive failure, your RAID array will keep things working. Drive failure will put your array in "degraded state", but will continue working. You must then replace the failed drive with a fresh one, and the array will rebuild itself, all without needing to stop your NAS and restore everything from a backup.

So RAID provides REDUNDANCY and avoids DOWNTIME is case of a drive failure.

 

WHAT RAID IS NOT:

A backup.

That's it. RAID will not and will never be a substitute for a proper backup.

There are a ton of things that can will happen that destroy your data and RAID will not protect against. This include, but it's not limited to:

  • Human error (accidentally delete files)

  • Software error/miss-configuration (Your media server having a bug and deleting 20TB from your media folder)

  • Ransomware/Malware attack

  • Hardware failure (lots of failures can destroy a full array)

  • Power surge can destroy a full array if NAS is not protected by an UPS

  • Burglars breaking in your house will probably end with your NAS (and all the drives inside) stolen

  • Tactical nuclear warhead will destroy all drives in a array, your NAS, your house, and most probably several km around the impact point

 

Some real live examples:

Client lost all files due ransomware attack in his server

Two drives fail in a RAID 1 array

Again, both drives in RAID 1 failed

User was hit by ransomware

Neighbor forgot his bathtub turned on and user NAS was flooded (ouch). Off-site backup saved him

Several user's experiences losing data

I could keep aaaaaaaaall day long.

This things happen. This things will happen to you. You probably think that chances are remote, but it will eventually happen.

 

I'm using a RAID with several parity drives, so I have a ton of fault tolerance. Do I still need a backup

Yes. RAID is not substitute for a backup, no matter how many drives your array can lose without destroying your data.

But I'm using QNAP's feature called "snapshots", does this count as backup?

Short answer: Nope

Long answer: Nope, NOPE. You still need backup.

Ok, I'll use one of the drive bays inside the NAS to make backup of the primary storage pool

No. Don't do this. This is not backup. That is just files duplicated inside the same machine. A backup must be outside the same machine, or else, is not a backup, because it is still vulnerable to most issues that can destroy a full array (ransomware, hardware failure, etc).

Backups must ALWAYS be performed outside the computer which has the files you are trying to backup.

Ok, so, If I don't care about downtime, I could skip using RAID and just use backup?

Yep.

If I'm gonna need to waste storage on a backup, then why use RAID at all and lose more storage space?

RAID is nice to have. When the drive containing your movies fails, you take it out, order a new drive, and when it arrives, you plug it in, and array will rebuild. During those days you will still have full access to all your media, and can keep watching them.

If you don't have RAID, you will lose access to your files until the replacement drive arrives and you can restore everything from your backups.

As I said, RAID is nice to have, but not essential. Backup IS essential.

I don't have enough resources to have both RAID array and backup. It's either one or the other. Which one should I choose?

Backup. Hands down. It's better to have data protection with downtime rather than no downtime but without data protection.

 

ok, so: how to plan a backup?

Backup Golden rule is: 3-2-1 (at least 3 copies of your data, in at least 2 different machines, with at least one off-site copy -be it online, or a physical different place-). that is the ideal backup solution.

The off-site backup is necessary to avoid losing your data in case of something happens on your house: Fire, flooding, burglars, etc. It's not always possible to get a full 3-2-1 backup, but at least 2-2-0 is the minimum required. This is why copying files to a different drive in the same machine is also NOT a backup.

First step is deciding what are your space requirements. It's easier to backup 3TB than 40TB. You must segregate your data between data you want to protect, and data you don't want to protect. If you do this, you must be mentally prepared to lose your unprotected data. Think if that is really the case.

You can also segregate into three groups:

  • Data you really want to protect (usually small amounts of data): perform 3-2-1 on this data, you can get up to 15GB from several cloud services for free

  • Data you want to protect but you cannot spend the money to make a full 3-2-1 onto: Perform at least 2-2-0 on this data

  • Data you don't care: Don't backup this

We all have been there. I had around 6TB of media files that I wasn't backuping because "I don't mind if I lose them, as I can download them again. All I really want to keep are photos and personal data". Then I had an power surge and thought I lost all my media, and realized that I did care about it. So, if you are going to select what lives and what dies, do it wisely.

Second step is to plan where you are going to backup.

  1. If your total to backup data count less than 12TB, the easiest way to backup it is using an external USB drive. WD Elements 10TB can be bought for 190€, and 12TB for around 220€ (EU prices). Get one of those. Connect it to your QNAP using USB3, and use HB3 to create an incremental backup job from your desired folders to the USB drive. When backup is completed, unmount it, unplug, and store it away (if you have a fireproof safe, it's a great place to store it). Repeat the backup each week (or monthly, more frequent backups will keep your data more up to date in case of needing it).

Congratulations. You now have a 2-2-0 real backup. You are NOW protected (to some extend). If you want to "upgrade" to 3-2-1, simply buy another drive and repeat the copy. Then you take drive 2 to another house (parents, girlfriend, friend, bank safe...) and store it there. I would recommend you to encrypt your data if you are going to leave it in another people's hands. Next time you update backup on drive 1 at home, then take it to the other house and switch drives 1 and 2. When you arrive back to home update backup on drive 2 and store it in your safe. Rinse and repeat. This is a cheap 3-2-1 backup.

  1. If your total to backup data count more than a single drive space, then things get trickier. You will need another NAS, create a JBOD or RAID array with enough space, and use it to backup your data. If you want off-site backup, you can store that NAS in other house (parents, etc) and perform backup directly through internet. If you have a friend with another NAS and some free bays, you can ask him to backup your data, while you backup his. Alternatively, you can pay monthly for cloud storage space, like Backblaze and backup there (although it might get expensive). QNAP offer tools for this, but there are also other alternatives, like rclone. If you are going to upload backups to cloud server, be sure to encrypt everything first.

 

What software should I use to backup my data, and what features should it have?

Ideally, a backup software should be able to perform incremental backups (it compares previous files with current files and only backups new files) and versioning (you can keep multiple version of the same file). This is ideally speaking, but if such thing is not possible, you could just past with a single "snapshot" of your current files. You will lose some features, like being able to recover files that you deleted weeks ago, but it's better than nothing.

QNAP's integrated backup solution is called HB3. You can use it to backup to other NAS, to a local folder (external drive) or cloud service.

https://www.qnap.com/en-au/how-to/tutorial/article/how-to-use-hybrid-backup-sync-to-backuprestoresynchronize-your-files-on-a-qnap-nas/

Unfortunately, HB3 will not work great for backup to non-QNAP machines. For this, you need to create a "sync job" using rsyn (as RTRR is a QNAP feature), and currently HB3 lacks encryption and versioning, so it's a less than ideal software for this. It will work great to backup to an external drive, though.

Other software that you can use are Borg Backup (probably simply the best backup tool that currently exist), rclone, or any Linux or windows backup software, as long as your QNAP supports Container Station or Virtualization Station.

I'm planning to create a detailed step-by-step tutorial for backup from QNAP to any other NAS using Borg Backup running in a container in the future.

I hope I have been able to make you conscious about the importance of real backups. If you are currently not backuping, you should start planning it right now, and set it as soon as possible. The fact that nothing has happened to your data in the last 8 years doesn't mean it cannot happen tomorrow.

If you have any question, correction or suggestion about this wall of text, please don't stay silent. Comment below, and if you feel competent enough to make a detailed tutorial on this matter, any help is really welcomed.

Keep your data safe, folks.

Posted Oct 7, 2019, 10:35 AM UTC · edited

8951
Loading comments…