Create snapshots with Timeshift

Simply Restore

Timeshift uses a directory structure that matches the filesystem. Likewise, in the event of damage, the folder or file can be restored simply using copy and paste (Figure 7). When it comes to rolling back the entire system, this is done either from the active system with a subsequent reboot, from another installed distribution, or via a live medium.

Figure 7: Unlike some backup applications, Timeshift does not use a proprietary file format, but lets you manually restore individual files and directories.

If there are several installed distributions, the restore will be successful even from the neighboring system – provided that Timeshift can be installed on it. If the snapshots are not on the system disk, you could theoretically install a different distribution and, if you don't like it, then restore the old system using a live medium. All you have to do is adjust the UUID manually, as the partition has been formatted in the meantime.

On the Running System

To restore from the running system, select the snapshot you want to restore and click Restore in the menubar. In rsync, then select the target drive (Figure 8). You can also optionally adjust the bootloader in this case if the subsequent reboot fails with the default setting. For Btrfs, the source and target drives are normally identical.

Figure 8: In general, the defaults that Timeshift specifies for the target device are a good fit. Nevertheless, you should take a close look at them.

In the next window, Timeshift performs a test run and then lists all the files it will be restoring. If required, you can also search for packages here. The last window displays the partitions involved once again (Figure 9). Click Next here to start the recovery. To be on the safe side, you should close running applications beforehand.

Figure 9: The last window, before the restore starts, shows what happens when you press Next (in an example with Btrfs). After that, there's no going back.

If you start the process on the running system, a terminal opens to let Timeshift restore the files. Do not interrupt the operation in the terminal – this could cause irreparable damage to the installation. After the recovery is complete, the system automatically restarts, reboots the selected snapshot, and then displays the current state of the system.

From the Outside

If you restore the system from a remote system, Timeshift will display the progress graphically instead. When the process is complete, restart the system. If this does not work, test another snapshot or modify the bootloader accordingly. However, in our test, problems of this type did not occur in any case.

If you are using Timeshift with Btrfs, you can continue working immediately after the restore. The desired subvolume then changes to the default at the next restart. Restoring Btrfs snapshots only takes seconds, whereas rsync takes 10 minutes or more, depending on the data volume.

If you test rsync on a Btrfs system first before switching to Btrfs snapshots later, Timeshift will seem to remove the rsync configuration. However, this is only a visual glitch: As soon as you switch back to rsync, you will see that all the snapshots are still available.

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

  • Graphical Backup Tools

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

  • Snapper

    Snapper lets you restore a system to its previous state – with a little help from Btrfs snapshots.

  • Snapshot Tools

    Experts agree that you should keep a copy of your data, but restoring from incremental backups takes time and sometimes doesn't work as expected. Alternatively, you can capture your data in a snapshot. Read on for a review of some leading Linux snapshot tools.

  • Snapper

    Thanks to Btrfs snapshots, Snapper lets you restore a system to a previous state in case of failure.

  • Welcome

    A few months ago, I wrote about the strange case of the misbehaving color.js and faker.js open source libraries. These popular tools were sabotaged by their own developer, who had become disillusioned by the way large companies were using his code without contributing or providing compensation.

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