loading...

Linux Mint – Backing up and restoring important data

How to install and use docker on ubuntu 18.04

Backups are the most important part of a disaster-recovery strategy. Often, people may not consider the importance of backups until they have lost everything. An urgent point to remember is that all hard drives fail eventually. It’s a question of when, not if. I have seen some hard drives last 10 years and others last less than a year (even the brand new ones). Under no circumstances should you trust that your hard drive will work when you wake up the next morning. Though there is a good chance the hard drive in your computer will last an average of three years, this is not guaranteed. If you have important files on your machine, it is imperative that you back them up.

Thankfully, Linux Mint, our Swiss Army knife, has you covered with a basic backup utility to get you started. Simply called the Backup Tool, you can use it to back up and restore not only your data, but your installed applications as well. The following screenshot shows Mint’s Backup Tool:

To create a backup, click on the Backup files button. For the source, navigate to the directory that you would like to back up (for example, your home directory). Then, you’ll be given a chance to exclude files from the backup, should you wish to do so. After clicking on the button, click on Apply.

There are some curious things to note about the Backup Tool. First, the Backup Tool runs as root. When you click on it from the Applications menu, it will ask you for your sudo password. In fact, even if you enter mintbackup without prefixing it with sudo on the shell in order to try and bypass the password requirement, it will still ask you for your sudo password. This is a very important thing to note, because when selecting a folder to back up and a target directory to place the backup in, the sudo requirement causes the Backup Tool to default to the root folders and not to your folders. For this reason, it’s important to click on Other in the Source dropdown and manually navigate to your home folder. Then, under the Destination dropdown, click on Other again and manually browse to where you would like to place the backup (which can even be an external hard drive, if you wish).

A second aspect that’s important to point out is that by default, your backup will contain a folder structure that is exactly the same as the source. Specifically, this means that the backup isn’t placed in a compressed archive by default. Instead, it’s just the files and folders themselves. This might be fine for you, but you may want to create a folder to place the backup in before starting the backup, so you don’t end up with all your files on the root of the backup target.

However, the Mint Backup Tool does actually include an option to place your backup into a compressed archive. On the Backup files section of the backup wizard, you’ll see a selection for Output, which defaults to Preserve structure. If you click on this prior to starting your backup, you’ll see several options to create a compressed archive instead. In most cases, this is recommended. For example, you can include the date in the filename of the compressed archive, to allow you to organize your backups in a better manner.

Restoring files is easy; simply reverse the steps of creating an archive after clicking on Restore files.

Note

Since the Backup Tool runs as root, you’ll also need root privileges to delete your backups as a result, as backups created by root are naturally owned by root.

The Backup software selection option of the Mint Backup Tool is also especially useful. With it, you can create a list of packages that you’ve installed since you installed Mint on your computer. The list that’s created via this tool is in a special format that it recognizes, so if you need to reinstall Mint, you can simply import this list to have the tool reinstall all the packages that you’ve installed. This is very handy, considering the fact that Mint doesn’t include an upgrade option to move from one release to another. You can back up your files, then back up a list of your installed applications, reinstall Mint, and then restore both the backups. This way, you’ll have all your favorite applications and your data moved over to the new release. To create a backup, click on the
Backup software selection button, and then choose a place to save the file. Keep in mind that this tool runs as root, so make sure you select a path from Other and then manually browse to where you would like the backup to be placed. To restore it, open the Backup Tool, then click on Restore software selection, and go through the prompts to select your saved backup.

There’s one last note about backups before we move on. Another type of backup you should consider is an offsite backup strategy. If you keep all of your backups in one place, you may be at risk of losing your data anyway. For example, a fire or flood could render your backups and your source computer useless, destroying all your data in the process. An offsite backup is ideal; preferably, the one that watches over your files and automatically uploads changes. SpiderOak and CrashPlan are both good examples, among others. SpiderOak is a very secure backup service, and CrashPlan features optional encryption settings that can be enabled. SpiderOak features device synchronization (so, you can create the same files on multiple devices), and while CrashPlan doesn’t offer sync, it’s cheaper when storing data over 100GB. Although both are paid services, they feature Linux versions of their backup clients, with which you would benefit from the peace of mind in having an offsite backup.

Comments are closed.

loading...