Backup Strategies For Your Computer
It's been a while since we've discussed the topic of backups on Linux. So it's definitely time we took a fresh look, and at least mention some of the current applications and methods available today.
How Do I Know What & Where To Backup?
Backing up the information on your hard drive on a regular basis is critical for anyone who uses a computer routinely. You have spent hours-on-end creating the information that is on your hard drive, and much of that data is extremely important and irreplaceable stuff! You should be routinely backing up at least your new data files on a weekly basis. "Data" files include databases, documents, spreadsheets, etc. Anything YOU created on your hard drive is a data file.
When we first started talking about backups, years ago, the only realistic way to perform a backup on a home computer was to save the data onto CDs, DVDs, Zip Drives, Jaz Drives or (worse still) floppy disks! Today, your best option is to use online storage, or an external hard drive. We'll focus our attention on backups to hardware devices. If you don't have a network attached storage (NAS) drive on your home network, you can readily purchase an external drive with terabytes (TB) of storage capacity, or even an inexpensive portable USB external drive with gigabytes of storage -- large enough to hold the data from most computers' hard drives today.
On a typical recordable CD you can store up to 700 megabytes (MB) of information while DVDs can store up to 8.4 gigabytes (GB). Blu-ray discs are the newest type of optical media. They can hold up to 50GB of data. With the size of files these days, you might get one or two video files on a DVD. If you have a file that is larger than 700MB (like a moderate LibreOffice Impress presentation file, or a Writer document with graphics) an ordinary CD has no hope of holding even one whole file.
When backing-up data files, it is not always necessary to backup every file you have on your hard drive. (Although it's a good idea to do so monthly. See below.) As a listener of the Going Linux podcast you may be a Linux user or a computer user interested in switching to Linux. If that's you, on your Linux computer, few files (if any) outside of your "home" directory need to be backed-up at all. If a disaster were to happen, and you lost your computer or your hard drive, you could simply reinstall the Linux operating system and your applications in well under an hour, then restore the backed-up contents of your "home" directory. Your "home" directory contains the information that you have created yourself, including your mail file, and the settings and preferences for most of your applications. In Episodes 29, 31, 106, and 307 of the podcast, we discuss specific Linux applications you can use to accomplish your backups.
If you have a home network you may be lucky enough to own a multi-gigabyte hard drive accessible to any computer on the network. Large external hard drives have become so inexpensive that it is wise to include an external hard drive in your budget when you are buying a new computer. In the illustration at the top of this page, I am using Ubuntu-MATE’s file manager to take my entire "home" directory (folder) and copy it to an external 3TB NAS drive shared on my network.
Instead of being stored on your computer's hard drive, the files you copy to an external or networked drive are stored safely off of your computer. That way, if something happens to your computer's internal hard drive, or if you have your laptop stolen, all your files are safely stored on an external device.
An equivalent to a network drive (well, sort of...) would be an online storage service like Dropbox, Box, or Google Drive. The advantage to this kind of backup is that your files are stored on the Internet. Even if the worst were to happen, and you lost everything to a fire or flood, your backups would be safe. And if you copy your files to online storage, you will also likely be able to access them from another computer, a tablet or smart phone!
Backing up Your Computer Is Cheap Disaster Recovery Insurance
As we've mentioned, one way to backup inexpensively, is to get a large firewire or USB 3.0 external hard drive and copy everything in your "home" directory to it on a regular basis. And perhaps the easiest way to ensure that you make your backups regularly is to automate the process using the backup software that comes pre-installed with your Linux distribution.
At least monthly, you should make a complete backup of everything important on your hard drive -- using backup software, or by simply copying to a second hard drive or a network drive. Linux applications such as the pre-installed Linux Mint Backup Tool (above), the pre-installed Ubuntu Backups application (below), Simple Backup and rsync can automate these backups for you. You do this so that if your computer or hard drive were to be stolen, destroyed or damaged beyond repair, you would have a "disaster recovery" copy. From a "disaster recovery" copy, you could restore your entire "home" directory to the condition it was in, at the time of your last backup. If you do such a complete backup monthly, the worst case would be that you would have to restore only one month's worth of data from your full data backups.
How often should I backup?
In reality, how often you should backup depends on several factors. In general, the more you use your computer or the more critical the work you are doing, the more often you should back-up.
You should use the external drive and/or your online storage to make a complete backup of your entire hard drive every month. As we've said, you can very likely automate the process using the backup software pre-installed, or available in your Linux distribution's package repositories. You can even setup some of this software so that it copies only new files, and updates new versions of files on your computer, to the backup device, never deleting anything from the copy. What a lifesaver that can be!
Use an external hard drive to make a monthly full backup. In addition, each week you should back up your critical data files in an incremental backup (i.e. backup only what has changed since your last full backup) onto your external storage, or to your online storage. Incremental backups can be automated, too, using many of the options we have discussed for backup software applications.
Don't wait. Setup a scheduled backup right now -- or you will wish you had!