Simple backup with Back In Time

Orderly Situation

Article from Issue 179/2015
Author(s):

Despite the importance of backups, many users still view the process as too complicated and too inconvenient. Back In Time makes the unloved backup less terrifying.

Most users are aware of the importance of backups, yet only a few regularly back up their data. They think the process seems too complicated and too complex, and it takes too much time and effort to perform backups regularly. For these same reasons, many people do not encrypt their email either.

At least for backups, however, you have a handy solution: Back In Time [1]. The software serves as a graphical interface for the well-known, console-based synchronization program Rsync [2], which less experienced users in particular often avoid because of its complexity.

The Python program can be installed from the repositories of all major distributions. KDE desktop users will tend to opt for the Qt-based version, whereas Gnome users will prefer the Gtk equivalent. Arch Linux offers a third package called backintime-CLI (command-line interface), which was developed for automatic use with the shell. The project also makes the software available for download on its website as a tarball.

Getting Started

Back In Time is capable of performing incremental backups as well. In contrast to archive-based backup systems, Back In Time creates a copy of the folder to be backed up and only saves changed files for other backups. This saves space and time.

The software stores the backups in a folder named with the creation date. The software copies previously backed up and unchanged files in the form of hard links to the directories of the respective new backup, thereby mapping the entire content. The structure of directories created by Back In Time is based on the pattern:

/mnt/backintime/<Computer>/<User>\
  /<Profile>/<Date>-<iNumber>/

The software always creates a backintime/ directory. <Computer> is the name of the computer, <User> is that of the user, and <Profile> is the number you assigned to a profile during setup. The backups themselves are in directories that use a date, a time, and an internal number (<iNumber>) for names. The backup from July 6, 2015, created at 20:19:51 is thus sent to the 20150706-201951-427 folder.

The last backup created is always available as a link with the name last_snapshot. This structure makes it possible to back up data from several users or different directories on a single backup medium using different profile, and to restore them from the backup medium as well.

Configuration

You can start the Back In Time configuration using the tool icon in the main window toolbar, which the software displays immediately when first launched. Back In Time adds flexibility through the option of managing different configurations as profiles. If you do not need this, note that Main profile always appears at the top of the screen in the Profile field.

You can set when and where the software backs up the data in the first tab, General (Figure 1), and you can select the backup type in the Mode field. Caution is advised with encrypted backups: You will not be able to access the backed up data if you lose the key specified here. You can define the target directory – in the simplest case, a previously prepared USB hard disk or a USB stick with sufficient space – in the Where to save snapshots section.

Figure 1: Back In Time supports locally connected storage as targets, as well as SSH-based transfers, for example, to a NAS.

In the case of a FAT filesystem, which is sometimes preconfigured, note that FAT is often unable to cope with the file names in Linux. Additionally, this deprecated filesystem is unfamiliar with hard links. In this case, Back In Time stores the complete source rather than just the changes made when backing up, thus taking up a large amount of storage space. The use of "intelligent" filesystems such as ext4, Btrfs, or ZFS is a possible remedy. These filesystems also support space-saving backups by compressing data blocks. Alternatively, you can store the backups on a remote computer or NAS via SSH.

You can specify the previously described folder hierarchy in the Advanced section; the software provides logical defaults here. Under Schedule, you can set the frequency at which the program starts the backups. In the Include tab, you can determine which files and directories the software considers for backups.

Folders such as the home directory normally contain various files and directors that you do not want to back up – for example, because they contain only temporary content or are caches. You can therefore exclude these from the backup in the Exclude tab (Figure 2). Note that .wine is sometimes missing from the defaults, which can cause problems. You can define the file name pattern using the Add button. An exclusion pattern in the form of .* prevents, for example, "hidden" files and directories – typically configurations in the home directory – from being included in the backup.

Figure 2: You can exclude specific objects from the backup either using concrete paths and files names or patterns.

To define what happens with old backups, go to the Auto-remove tab (Figure 3). The Smart remove option here provides several interesting ways that you can reduce the number of backups to the absolute minimum. You can protect particularly important – and therefore named – backups separately by enabling Don't remove named snapshots.

Figure 3: Back In Time provides various options for automatically removing old backups.

You can specify the settings for running the software in the Options tab. If you do not have any special requirements, you can generally leave the default settings. With the Expert Options tab, and others, you can determine which attributes you want to keep in the backup, depending on your strategy for your system or home directory [3].

You will also find an important option here for Editing Symlinks: Copy links (dereference symbolic links). Back In Time only considers the files included via symlinks if you enable this option. If you do not enable this option, the program only stores the symlinks themselves as files, and they then point to nothing.

Managing Backups

After completing the setup, Back In Time (Figure 4) usually works relatively inconspicuously in the background but can also start its work on demand. The second approach means that you can create manual backups in certain situations – for example, backing up all relevant data before an update. To this end, manually create a snapshot and assign a name. You can do this using the button with the pencil icon. After creating the snapshot, you need to select and name it. Back In Time can manage this kind of backup differently if desired.

Figure 4: The main window in Back In Time keeps you informed of the various jobs and gives you easy access to previously created backups.

Back In Time supports the analysis of backups with a relatively unknown function that can be accessed via a button in the main window (Figure 5). This button opens a dialog displaying the existing snapshots in a list. Here you can specifically select, compare, and – if necessary – delete individual snapshots or even restore them. Back In Time uses Meld [4] by default to analyze snapshots; you can configure other diff tools in Diff Options as required.

Figure 5: Back In Time uses Meld to compare backups (snapshots) both with each other and with the current state of the filesystem.

Entering backintime -b at the command lines starts the application without the graphical interface. The --backup-job option follows the schedule rules for automatic backups. The --snapshots-path button shows the path used for the snapshot, --snapshots-list shows the snapshots available there, and --snapshots-list-path shows the snapshot paths. The --last-snapshot extension shows the ID of the last snapshot, and --last-snapshot-path shows its path.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Backup Solutions

    Backup strategies in IT are essential and expensive in terms of planning and administration, but individuals have simpler solutions. We look at five backup solutions for the desktop.

  • Graphical Backup Tools

    Graphical backup solutions help you protect your data with just a few mouse clicks. We study six popular options.

  • Flyback

    The rsync-based Flyback tool automatically creates snapshots of critical directories at regular intervals – and ordinary users can restore the backup with a few easy mouse clicks.

  • luckyBackup

    Fully automatic and space-saving backups – that’s what luckyBackup promises. This tool combines Rsync with other techniques into one comfortable application for backing up data.

  • Box Backup

    The Box Backup network backup tool is a simple and secure solution for traveling clients. We'll show you how to get started with this open source tool.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News