Table of Contents
- What is Timeshift?
- How Timeshift Works: Snapshots Explained
- Installing Timeshift on Linux
- Setting Up Timeshift: A Step-by-Step Guide
- Managing Snapshots
- Advanced Features
- Pros and Cons of Timeshift
- Conclusion
- References
What is Timeshift?
Timeshift is an open-source system restore utility for Linux, developed by Tony George (creator of BleachBit). Its primary goal is to protect your system files and settings by creating snapshots—point-in-time copies of your OS that can be restored if something goes wrong.
Unlike general-purpose backup tools (e.g., rsync, Deja Dup), Timeshift focuses specifically on system files (e.g., /bin, /etc, /usr) and not user data (e.g., documents, photos, downloads). This distinction is critical: Timeshift ensures your OS remains bootable and functional, while you’ll need a separate tool (like Deja Dup or rsync) to back up personal files.
Timeshift’s simplicity is its greatest strength. With a clean graphical user interface (GUI) and intuitive workflows, even Linux newcomers can set up automated snapshots in minutes.
How Timeshift Works: Snapshots Explained
At its core, Timeshift creates snapshots of your system’s root filesystem. These snapshots are stored in a dedicated directory (e.g., /timeshift on an external drive) and can be restored later to revert your OS to a previous state.
Snapshot Types: RSYNC vs. BTRFS
Timeshift supports two snapshotting methods, depending on your filesystem:
1. RSYNC (Default for Most Filesystems)
RSYNC is a file-level copying tool that works with any filesystem (ext4, NTFS, XFS, etc.). When you create an RSYNC snapshot, Timeshift:
- Copies all system files to the target location on first run.
- Uses hard links for subsequent snapshots to save space: unchanged files are linked to the first snapshot, while modified files are copied anew.
This makes RSYNC snapshots space-efficient—only changed data is stored after the initial snapshot.
2. BTRFS (For BTRFS Filesystems)
BTRFS is a modern filesystem with built-in snapshot support. If your root partition uses BTRFS, Timeshift leverages BTRFS’s native snapshotting, which is faster and more efficient than RSYNC. BTRFS snapshots are:
- Created instantly (no file copying—just metadata pointers).
- Stored as subvolumes within the BTRFS filesystem.
Note: BTRFS snapshots require your root partition to be formatted as BTRFS and mounted with subvolume support (common on distros like openSUSE or Manjaro with BTRFS setups).
Installing Timeshift on Linux
Timeshift is pre-installed on some Linux distributions (e.g., Linux Mint, Pop!_OS), but most users will need to install it manually. Below are instructions for popular distros:
Ubuntu/Debian-based Distributions (Ubuntu, Linux Mint, Pop!_OS)
Timeshift is available in the official Ubuntu repositories for 20.04 LTS and later. Install it via:
sudo apt update && sudo apt install timeshift -y
For older Ubuntu versions (18.04 or earlier), use the PPA:
sudo add-apt-repository -y ppa:teejee2008/timeshift
sudo apt update && sudo apt install timeshift -y
Fedora/RHEL-based Distributions (Fedora, CentOS Stream, Rocky Linux)
Fedora users can install Timeshift from the RPM Fusion repository:
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install timeshift -y
Arch Linux and Derivatives (Manjaro, EndeavourOS)
Timeshift is available in the Arch User Repository (AUR). Use an AUR helper like yay:
yay -S timeshift
Other Distributions
For distros not listed above (e.g., openSUSE, Gentoo), check your package manager or compile from source via Timeshift’s GitHub repo.
Setting Up Timeshift: A Step-by-Step Guide
Once installed, launch Timeshift from your application menu. You’ll be guided through a setup wizard to configure your first snapshot.
First Launch and Snapshot Type
On first launch, Timeshift will prompt you to select a snapshot type:
- RSYNC: Choose this if you’re using ext4, NTFS, or any non-BTRFS filesystem.
- BTRFS: Choose this only if your root partition is BTRFS and uses subvolumes.
Select your option and click “Next.”
Choosing a Storage Location
Next, select where to store snapshots. Never store snapshots on your root partition—if your root drive fails, your snapshots will be lost too! Instead:
- Use an external USB drive (formatted as ext4, NTFS, or FAT32).
- Use a secondary internal drive or a separate partition (e.g.,
/dev/sdb1).
Click “Browse” to select the drive/partition, then “Next.”
Configuring Schedules
Timeshift can automate snapshots so you never forget to back up. Choose a schedule based on your needs:
| Schedule | Description | Recommended For |
|---|---|---|
| Daily | 1 snapshot per day (retains last 5) | Heavy users, developers |
| Weekly | 1 snapshot per week (retains last 4) | Casual users |
| Monthly | 1 snapshot per month (retains last 3) | Stable systems |
| Boot | 1 snapshot every time you boot (retains last 5) | Critical systems |
Enable the schedules you want and adjust retention counts (e.g., keep 7 daily snapshots instead of 5).
Excluding Files and Directories
By default, Timeshift excludes user data directories (e.g., /home/*/Documents, /home/*/Downloads) to avoid bloating snapshots. You can customize exclusions by:
- Adding paths manually (e.g.,
/var/cacheto skip package caches). - Removing default exclusions (not recommended—user data belongs in personal backups!).
Click “Next” to finalize setup. Timeshift will now create your first snapshot (this may take 10–30 minutes, depending on your system size).
Managing Snapshots
Once set up, Timeshift will automatically create snapshots per your schedule. You can also manage snapshots manually via the GUI.
Creating Manual Snapshots
For critical changes (e.g., before updating the kernel or installing risky software), create a manual snapshot:
- Open Timeshift and click “Create.”
- Add a description (e.g., “Before kernel 6.2 update”).
- Click “OK”—the snapshot will be saved to your storage location.
Restoring from a Snapshot
If your system breaks (e.g., boot loops, broken dependencies), restore a snapshot:
Option 1: Restore from Within the OS (If Bootable)
- Open Timeshift and select the snapshot to restore.
- Click “Restore” and confirm the target partition (usually your root drive).
- Reboot—your system will revert to the snapshot state.
Option 2: Restore from a Live USB (If Unbootable)
- Boot from a Linux live USB (e.g., Ubuntu installer).
- Install Timeshift on the live environment (
sudo apt install timeshift). - Launch Timeshift, select your storage location, and restore the snapshot.
Deleting Old Snapshots
Timeshift automatically deletes old snapshots per your retention policy, but you can manually delete snapshots:
- Select the snapshot in the GUI.
- Click “Delete” and confirm.
Advanced Features
Timeshift offers tools for power users too:
Custom Exclusion Lists
Create reusable exclusion lists (e.g., exclude-list.txt) with paths to skip, then load them in Timeshift via “Settings > Filters > Load Exclusions.”
Command-Line Interface (CLI) Control
Use timeshift-cli to automate tasks via scripts:
# Create a manual snapshot
sudo timeshift --create --comments "CLI test"
# List all snapshots
sudo timeshift --list
# Restore a snapshot (replace <ID> with snapshot number)
sudo timeshift --restore --snapshot <ID>
Snapshot Verification
To ensure snapshots are intact, verify them via “Settings > Snapshot Verification.” Timeshift will check for corrupted files and missing data.
Pros and Cons of Timeshift
Pros
- User-Friendly: Intuitive GUI for beginners.
- Lightweight: Minimal system resource usage.
- Space-Efficient: RSYNC hard links and BTRFS subvolumes save storage.
- Flexible: Supports multiple filesystems and schedules.
Cons
- No User Data Backup: Requires a separate tool for
/homefiles. - BTRFS Limitations: BTRFS snapshots need specific partition setups.
- No Cloud Sync: Snapshots are stored locally (use external drives for redundancy).
Conclusion
Timeshift is a must-have tool for Linux desktop users. It simplifies system backup with automated snapshots, ensuring you can recover from crashes, bad updates, or misconfigurations in minutes. While it doesn’t replace personal data backups, it’s the first line of defense for keeping your OS healthy.
Pro Tip: Combine Timeshift with a personal backup tool like Deja Dup (for /home files) to cover all bases. With both tools, you’ll sleep easy knowing your system and data are protected.