Installing proprietary GPU graphics drivers, testing experimental desktop environments, or applying major distribution upgrades in Ubuntu occasionally leads to disastrous system states: broken display managers (GDM), unbootable kernels, or corrupted system libraries. On Windows, users rely on System Restore to roll back catastrophic mistakes in minutes. On Linux, Timeshift provides the exact same safety net, capturing comprehensive snapshots of your operating system files and allowing you to restore your computer to a perfectly working state even if the graphical desktop fails to load.
How Timeshift Protects Your Linux Installation
Timeshift is specifically engineered to protect operating system binaries, kernel modules, and system configurations—not personal user documents:
- System-Only Snapshots: By default, Timeshift captures
/boot,/etc,/usr, and/varwhile explicitly excluding your/home/user/directory. This guarantees that rolling back an operating system update never deletes your recent documents, downloads, or browser files. - RSYNC Hard Links: On standard ext4 filesystems, Timeshift uses incremental rsync backups combined with hard links. Unchanged files across snapshots take up zero additional disk space, making snapshots lightweight and rapid.
- BTRFS Subvolume Snapshots: If Ubuntu is installed on a BTRFS filesystem, Timeshift takes instantaneous atomic snapshots with zero file-copying delay.
Step 1: Install Timeshift on Ubuntu
Timeshift is available directly in the official Ubuntu software repositories:
- Open a terminal window (Ctrl + Alt + T).
- Update your local package index:
sudo apt update - Install Timeshift using
apt:sudo apt install -y timeshift
Step 2: Initial Setup via the Timeshift Setup Wizard
Launch Timeshift from your Ubuntu application overview or by typing sudo timeshift-gtk in the terminal. The Setup Wizard will guide you through configuration:
1. Select Snapshot Type
- RSYNC (Default for most users): Choose this option if your Ubuntu drive is formatted as
ext4. Compatible with all storage types and external USB drives. - BTRFS: Choose this only if your Ubuntu root partition was formatted with BTRFS during OS installation.
- Click Next.
2. Select Snapshot Destination
Choose the storage drive where snapshots will reside. While you can save snapshots to your main internal drive, storing them on a secondary internal drive or dedicated external backup disk is recommended to safeguard against drive hardware failures.
3. Configure Automated Snapshot Schedules
Tick your preferred retention schedule:
- Daily: Retain 5 snapshots.
- Boot: Retain 3 snapshots (automatically captures state whenever your PC boots).
- Keep weekly and monthly numbers modest to prevent filling your disk.
4. Review User Home Directories
Timeshift displays user directories with a default rule of Exclude All Files. Keep this setting intact so personal media and working files remain unaffected during OS restorations.
Step 3: Creating a Manual Snapshot Before Major Updates
Always take a manual snapshot before compiling custom kernels, editing GRUB, or installing proprietary Nvidia drivers:
- Open Timeshift and click the Create button in the top toolbar.
- Timeshift analyses system files and generates an incremental snapshot within 1–3 minutes.
- Once finished, a new timestamped row appears in the snapshot list.
Step 4: Restoring Ubuntu When the System Fails
Depending on whether your graphical interface works, restore your machine using one of two methods:
Method A: Restoring from Within the Desktop
- Open Timeshift.
- Select the snapshot you wish to restore from the list.
- Click Restore in the top toolbar.
- Follow the verification prompts and confirm bootloader targets.
- Click Next. The system will restore files and reboot into your previous working state.
Method B: Restoring from Terminal or Live USB (Unbootable System)
If Ubuntu fails to reach the login screen:
- Boot your computer using an Ubuntu Live USB installation drive.
- Open a terminal and install Timeshift:
sudo apt update && sudo apt install -y timeshift - Launch Timeshift, and it will immediately detect the existing snapshots on your hard drive.
- Select your snapshot, click Restore, and let it repair the unbootable internal drive.
Timeshift vs Traditional Backup Tools
| Tool | Primary Scope | Personal Data Included | Target Use Case |
|---|---|---|---|
| Timeshift | Operating system & root binaries | No (Excluded by default) | Rolling back broken drivers, kernel updates |
| Déjà Dup (Ubuntu Backups) | User files (/home/user) |
Yes | Recovering deleted documents and spreadsheets |
| Clonezilla | Entire raw disk image | Yes (complete partition clone) | Bare-metal drive replacement |
Troubleshooting Timeshift Storage Headroom
If your storage drive begins filling up, open Timeshift, highlight older snapshots you no longer require, and click Delete. Never delete snapshot folders manually using the rm terminal command inside /timeshift/, as this breaks hard-link reference trees. Always permit Timeshift to handle snapshot removal internally.
Configuring Timeshift on Ubuntu provides essential system recovery insurance, allowing you to experiment freely with advanced software knowing you can restore your OS in minutes.