Why You Should Use Timeshift to Back Up Your Computer

Timeshift Operation

Timeshift is a relatively new utility for Linux, but it’s something that’s become so essential to desktop users that many distros have added it to their official repositories. This nifty application essentially brings the System Restore utility from Windows to Linux.

Timeshift allows you to create incremental backups that produce exact images of your system at a specific point in time. You can use them to restore your system to the exact state that it was in when the backup was made. Since they’re incremental, they don’t take nearly as much hard drive space to store. In this post we show you how to get started with Timeshift on your own desktop.

Also read: 4 Ways to Increase the Battery Life of Your Linux Laptop

Why Use Timeshift

First off, Timeshift isn’t primarily meant for servers (though it does have great command line usability). It’s designed with desktops in mind, and it shines there. There are plenty of reasons that you’d want to use Timeshift on a desktop Linux system.

It lets you roll back from bad updates, security issues, and just about anything else that can go wrong with your system, even the mistakes that you make yourself. If you’re worried about security, you might want to check out the best Linux-Libre distributions for improved protection.

Timeshift also allows you to create backups to external and networked hard drives. That means that it can service backups even when the hardware it’s installed on fails.

There’s even an extra feature that makes it better than Windows’ System Restore: Timeshift can be set to run at just about any time interval automatically. You can have your system back itself up every night, week, or month, and never worry that your latest backup is outdated.

Also read: How to Update Firmware in Your Linux Machine

How to Install Timeshift

Timeshift is now available in most Linux repositories and can be installed directly from your package manager. Here are a few examples of the installation in major Linux distros:

Debian/Ubuntu-based Distributions

sudo apt install timeshift

Arch Linux

Timeshift is available in the Arch User Repository (AUR). You will need an AUR helper to access this special repository. In this example, we used Yay to install Timeshift:

yay -S timeshift

Fedora

sudo dnf install timeshift

Void Linux

sudo xbps-install timeshift

Also read: SELinux vs AppArmor: What Are the Differences and Which One Should You Use?

Getting Started with the GUI

Find the Timeshift application in your system like you would any other. In most desktop environments, simply press the Super (Win) key and type its name in the search bar then press Enter. Click on Timeshift to start the setup.

  1. You’ll need to decide whether you want to run your backups via Rsync or BTRFS. Unless you formatted your hard drive for BTRFS, Rsync is the right choice.
Start Timeshift
  1. Select where you want to store your backups. Pick the drive where you want your backups to go. A different drive than the one your system is installed on is usually a better option if you have it available.
Select storage location
  1. Timeshift will ask you to set up the timing of your backups. Set something that makes sense for your system. Usually, weekly or nightly backups work best on desktops.
Set Backup Schedule
  1. Once all this is set up, Timeshift will let you know that the setup is finished.
Complete Timeshift Setup
  1. If you ever want to go back and change your settings, hit the “Settings” button on the top of the window to do just that.
Timeshift Settings

Also read: The Best Open Source Tools to Secure Your Linux Server

Creating a Backup

Creating a backup of your system is super easy, and you can make one right after you set up Timeshift. This gives your system a starting point.

  1. Click on the “Create” button. Timeshift will immediately begin backing up your system. During the process, a window will pop up to show you what it’s doing and give you a visual of its progress.
Create A Backup
  1. After the backup process is completed, you’ll be able to see it listed on the main screen. Timeshift lists all of its backups there.
Timeshift Backups
  1. If you ever want to restore using one of them, you can click on the “Restore” button to begin the restoration process. Remember, restoring your system will destroy any changes made after your restoration point. That means you can lose files.

Also read: Basic Bash Commands for Linux Newbies

How to Restore a Backup

You’ve backed up your system files, and now it’s time to restore them. Timeshift is capable of restoring in a variety of conditions, which we will walk you through:

If You Can Reach Your Desktop

  1. Going past the login screen, if your system manages to boot to desktop, you can just open Timeshift and set up a restore operation by clicking the “Restore” button at the top row of the window after selecting the backup/snapshot you’d like to restore your system to.
Timeshift Restore
  1. Next, you’ll be asked to select different partitions for certain parts of the snapshot (like the bootloader or home folders) to be restored to, but you can normally safely ignore these options and click “Next.”
  2. Wait for Timeshift to analyze your file system and compare it to the backup image. Once it’s done it’ll show you a list of tasks it will perform according to its analysis.
Timeshift Analysis
  1. Click “Next” again, and you’ll see one last warning that informs you that Timeshift will write changes to your disks. Agree to continue and the restoration process will begin. It will blank your screen and give you details on what it’s doing.
  2. Once it’s done, Timeshift will reboot your computer.

Also read: How to Set Up Bluetooth in Linux

If You Can’t Boot to Desktop But Still Have Access the Login Screen

In this circumstance, your display manager was able to open meaning that you are technically booted into the system, but your desktop environment failed to load properly. To access Timeshift, we’ll need to access a terminal.

  1. To access the Linux fallback (TTY) terminal prompt, press Ctrl + Alt + F2 or Ctrl + Alt + F3 on your keyboard. Depending on the distro, either of these key combinations should take you to a terminal where you are asked to log in.
  2. Type in your user name and password, and you’re now in your system!
Timeshift Login
  1. To restore a snapshot using Timeshift here, just type:
sudo timeshift --restore
  1. You’ll be presented with a list of snapshots and asked to pick one. We selected snapshot 0.
Timeshift Snapshot
  1. You’ll now be asked to press Enter. In almost all use cases, you could just keep pressing it until it starts the restore process.
Timeshift Confirmation
  1. Tap your Y key and then press Enter to confirm. Once Timeshift is done restoring your system, you’ll be booted back into your system which now should work perfectly fine.
Timeshift Disclaimer

Also read: How to Build a New PC For Linux

If You Can’t Boot At All

For this process, you’ll need a live USB/DVD of a Linux distro to boot into. You can use a software like balenaEtcher to create one.

  1. Shut down the computer, then boot from the USB stick/DVD you created. If it asks you to whether you want to try or install the distro, pick the “Try” option.
  2. Once you’re in, install Timeshift like you normally would in your system using the steps described earlier in this article.
  3. Open Timeshift, pick the drive your snapshots are stored in, and you should now see the ones you’ve made.
Timeshift Live
  1. Since you’re in a Live USB environment, it won’t allow you to do anything else with your snapshots except restore them. Just click the “Restore” button at the top of the window after selecting your snapshot and you’re golden!

Also read: 4 Ways to Clone an Entire Hard Drive on Linux

Frequently Asked Questions

Why doesn't Timeshift's window follow my theme?

You may have noticed this especially if you normally use a dark theme: Timeshift’s aesthetics will not follow anything you have on your system. This happens because the application itself runs on a root shell. That’s why it asks you for an administrative password as soon as you open it. The root shell’s theme and your user theme are two completely separate entities managed in different parts of your file system.

To make this as simple as possible without going on a long conversation about root shell modification and its security implications, an application opened with elevated privileges will always use the root shell, which is almost always the vanilla default theme your desktop environment comes with.

Can I delete older backups without breaking Timeshift?

Yes, you can delete whatever backups you want in Timeshift in any order you want without issues! Since backups are incremental, it’s normal to assume that removing an image might create a Jenga tower situation and break the sequence. However, Timeshift performs its backups using a little bit of file system magic with hard links that allow it to store multiple instances of a file in different locations. This allows the application to remove an image while preserving overall backup integrity.

Why doesn't Timeshift back up my home folder?

By default, Timeshift is configured to exclude both your home folder and the root home folder. If you want this changed, you can configure this by going to “Settings -> Users” and opt to include files from the home directories listed. Once that’s done you will have to create another backup so it can include the files and folders.

All screenshots by Miguel Leiva-Gomez and Nick Congleton.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Miguel Leiva-Gomez
Miguel Leiva-Gomez - Staff Writer

Miguel has been a business growth and technology expert for more than a decade and has written software for even longer. From his little castle in Romania, he presents cold and analytical perspectives to things that affect the tech world.