Backing up and restoring your system using Systemback

Snapshot

© Lead Image © scyther5, 123RF.com

© Lead Image © scyther5, 123RF.com

Article from Issue 172/2015
Author(s):

At the push of a button, Systemback backs up or clones the complete current system and can restore it as required.

Windows provides extremely useful recovery points. At the push of a button, the operating system backs up the whole system in its current state. You can restore this backup later and thus return to the old state. This feature is particularly useful if newly installed software goes haywire or if you accidentally trash the configuration. Until now, such a function has been missing in Linux. To back up the system, you either had to use a backup program or had to back up the whole partition with a Live system, such as Clonezilla [1], which is fairly awkward.

The tool Systemback brings this recovery feature to Linux. Systemback backs up the current system and restore it as needed (see the "Warning" box). Systemback also offers the possibility of copying the current system, or one of the backups, to another data storage device; this is particularly useful if you want to migrate the system to a new computer.

Warning

When first using Systemback, try backing up and restoring on a test system. This way, you will know what steps you need to take in a worst-case scenario. The publisher and author assume no liability for incorrect operation or software errors.

As a bonus, Systemback creates a Live system on the computer that can be written to a USB flash drive or a DVD. Finally, the tool also handles updates and will try to repair a faulty system. Systemback has one small drawback, however: Currently it only runs on Debian "Jessie" and on Ubuntu and its derivatives, such as Linux Mint 17.

Launch Ramp

How you install Systemback depends on the particular distribution you are using. If you are running Ubuntu, or a distribution based on it, simply integrate a PPA and then install the systemback package from it (Listing 1).

Listing 1

Install Systemback

$ sudo add-apt-repository ppa:nemh/systemback
$ sudo apt-get update
$ sudo apt-get install systemback

You can download the latest version of Systemback from SourceForge in Debian "Jessie" [2]. When doing so, make sure to get the Systemback Install Pack, which SourceForge should offer to download by default. Unpack the archive on the hard drive and then, working as the root user, launch the install.sh script, which will guide you through the software installation.

You can start Systemback either using the Dash or the Start menu, or by entering the command from Listing 2 in a terminal. Systemback requires system administrator or root rights at startup to work. The main window from Figure 1 then appears.

Listing 2

Start Systemback

$ /usr/lib/systemback/sbsustart systemback
Figure 1: The Systemback user interface is currently available only in English.

Depository

Systemback stores backups in the /home directory by default. To change this, click at the top right in the input field under Storage directory to the right of /home. Systemback can use the directories marked with a red bullet.

Systemback later creates the Systemback directory, where the individual backups go, in the selected storage directory. Therefore, this directory must provide at least twice as much storage space as the system currently occupies. The command-line tool df -h, for example, shows the corresponding value in the Used column.

Systemback merely backs up the system and configuration files from the user directories. Thus, you must look after data and documents yourself. Systemback understands all configuration files and subdirectories that begin with a dot, such as .config.

You can exclude a specific configuration file or all configuration files from the backup by clicking Exclude in the main window. Now, in the list on the left-hand side of the new window, you can select the file or directory you do not want to back up then click on the right arrow (Figure 2). To remove any entries you might have chosen accidentally, click on the file then the left arrow. Pressing Back returns you to the main window.

Figure 2: The Exclude dialog is where you would direct Systemback to exclude the .cache directory from the backup.

Friendly Service

Click on Create new to create a new backup. The process may take a while depending on the system. Systemback will back up a freshly installed Ubuntu 14.10 in about 10 minutes. A new entry then appears in the main window on the left-hand side in one of the restore points. Systemback names the backup to reflect the current date. To rename it, simply click on the field, enter a descriptive name, and save the changes by clicking on Rename.

Systemback then only saves the files that are new or modified for future backups (see also the "Behind the Scenes" box). These incremental backups are advantageous because they take up less disk space. However, a faulty backup means that any subsequent backups cannot be restored either. For this reason, you should basically never delete directories manually or make changes in the selected Storage directory.

Behind the Scenes

Systemback first creates a new subdirectory for each backup in the specified Storage Directory (/home/Systemback by default). The subdirectory names start with an S and a number in sequence, followed by the creation date and time of backup. You can thus find the second backup (S02) created by Systemback on December 22, 2014, at 5:41pm in the S02_2014-12-22,17.41.46 subdirectory. The directory names of "highlighted restore points" always start with H. If you rename the backup in the main window, the directory name will change, too.

When creating the first backup, Systemback simply copies all system files into the corresponding directory (S01_…). During the next backup, Systemback only backs up newly added files and those that have changed in the meantime in the appropriate directory (S02_…). For the corresponding unchanged files of the previous backup, it simply creates references in the form of hard links [3]. If you view the backup directories with a file manager, a complete copy of the system appears to exist in each directory.

Systemback can manage up to 10 system backups. You will have to delete one or more backups if a new operation is to store the backup in the Restore points column. Check the box to the right of the backups that are to be deleted (Figure 3) and click Delete. All subsequent backups then move up one place.

Figure 3: In this example, clicking Delete would delete the backup listed third from the top.

In addition to this method, you can free up space in another way: If you click on the dot to the left of the backup, Systemback will highlight this and all newer backups in red (Figure 4). As soon as you click Create new, Systemback will delete the highlighted backups and immediately create a new one. Do not forget to select the next free field on the left-hand side. Otherwise, the next click on Create new would overwrite the current backup.

Figure 4: Clicking Create new will delete the backups marked in red and start a new backup.

You can mark particularly important backups separately. Check the box to the right of the backups and click Highlight. This will move the backup to the middle column. Systemback labels the backups collected there as Highlighted restore points. They cannot be (accidentally) overwritten, but they can be deleted by pressing Delete. A backup promoted in this way cannot be downgraded again to a normal backup – so think carefully before clicking Highlight.

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

  • 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.

  • Qt4-fsarchiver

    Qt4-fsarchiver lets you back up files, complete partitions, and create disk images with a single mouse click.

  • Areca Backup

    Sometimes you just need to back up a few directories on a computer, not administer a distributed installation or an array of disks. Areca Backup gives you hassle-free backups of individual hard drives.

  • Graphical Backup Tools

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

  • Bacula

    When backup jobs become too challenging for a script, the daemon-based free backup tool Bacula may be the answer.

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