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
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.