Linux Format

MAKING THE CASE FOR RAID

Discover how you can go from back-up zero to data saviour in just a few clicks, with the excellent Déjà Dup.

-

One mitigation against drives failing is RAID (redundant array of independen­t/inexpensiv­e disks). The idea here is to use a bunch of drives (usually, but not necessaril­y, the same size) to provide redundancy (or speed in the case of RAID 0, which we won’t discuss). Common RAID schemes vary from simple mirroring across two or more drives (RAID 1), to more complicate­d arrangemen­ts that store parity data across at least three (RAID 5) or four (RAID 6) drives.

With RAID 5 for example, you can have a three-drive array such that if any one drive fails then data can be reconstruc­ted from the other two drives. Unfortunat­ely, for large drives recovery is a lengthy and I/O intensive process, and there’s a possibilit­y of another drive failing during the rebuild. You can experiment with the numbers at https://magj.github.io/raid-failure, but it’s reasonable to caution against using, say three 4TB consumer drives in RAID 5 (which would give you a total capacity of 8TB, but also a 53 per cent chance of a unrecovera­ble error during rebuild). Instead, if integrity means more to you than capacity, use the drives in RAID 1 formation. You only get 4TB total space this way, but gives you double the redundancy.

You’ll often hear it said (including by us) that RAID is not backup and you should heed this wisdom. However, RAID in tandem with backup is certainly a good thing, and so we’ll look at setting that up later on in the feature.

Deciding what you want to back up can be tricky. However, it’s worth considerin­g taking a different approach for system files and your user data. In our Mint feature last month we looked at Timeshift, which is Mint’s equivalent of Apple’s Timeshift or Windows System Restore Points. Timeshift is well supported in distros other than Mint and is an excellent way to mitigate against updates (or users!) breaking the system. Just roll back to a previous snapshot and block that update or don’t do that configurat­ion change. If your system files become damaged then it can help you restore good versions, and if you want it can take care of your personal files, too. Yet you should perhaps not do that, since you may end up inadverten­tly backing up much more than is useful (Spotify caches, say). Other programs will give you more granular control of this.

Turn disaster into opportunit­y

You may also prefer to use operating system breakage as an opportunit­y to upgrade to a newer distro or re-installing the current version, in which case the Timeshift approach is no use. Installing Linux (on a good day) takes less than five minutes, and if you prepared beforehand, you can more or less replicate your system in around the same time. On Debian-based systems you can make a list of all currently installed packages with $ dpkg –get-selections > installed_packages.txt

If you keep such a file updated (even on an ad hoc basis) and are able to recover it, then you can use it to

reinstall those packages. That way we don’t need to worry about backing up programs (the large /usr and /lib directorie­s, for example). We should back up configurat­ion files too, which live in /etc or /var/lib. If you know the services and daemons that you have configured yourself, then you can cherry-pick individual files from here. Obviously, this becomes more complicate­d for servers, but in a connected world we may as well make use of the fact that everything is in the cloud (dude). For this reason there’s no critical reason to back up your Steam library, or indeed your towering collection of Linux Format DVDS (ah, I remember them, they’ll be back – Ed) . Whatever your data habits, there are at least a few personal files that you should back up. Password manager keyrings, browser bookmarks, work documents and photos spring to mind. Your own digital procliviti­es and priorities will determine whether this amounts to megabytes or terrabytes

We’re going to look at backing those up quickly and easily with Déjà Dup. The software can back up to a local or network drive, and can also back up to cloud services such as Google Drive. Best of all, it can set up a schedule so that backing up is carried out automatica­lly. After all, having backups is all well and good, but they rapidly lose their usefulness if they can’t be easily restored, or if they become corrupt.

On the next page we’ll look at a slightly more advanced approach to backups…

 ??  ?? Our trusty NAS uses RAID and is housed in a box very much like this.
Our trusty NAS uses RAID and is housed in a box very much like this.
 ??  ?? Using a disk usage analyser such as Filelight will help you identify any other large directorie­s in your home folder that you needn’t waste space and time with.
Using a disk usage analyser such as Filelight will help you identify any other large directorie­s in your home folder that you needn’t waste space and time with.
 ??  ??

Newspapers in English

Newspapers from Australia