Backing up and restoring your system using Systemback
Snapshot
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
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.
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.
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.
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
(incl. VAT)
Buy Linux Magazine
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.
News
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.