linuxmint / timeshift

System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. Supports scheduled snapshots, multiple backup levels, and exclude filters. Snapshots can be restored while system is running or from Live CD/USB.
1.53k stars 75 forks source link

Timeshift

Timeshift for Linux is an application that provides functionality similar to the System Restore feature in Windows and the Time Machine tool in Mac OS. Timeshift protects your system by taking incremental snapshots of the file system at regular intervals. These snapshots can be restored at a later date to undo all changes to the system.

In RSYNC mode, snapshots are taken using rsync and hard-links. Common files are shared between snapshots which saves disk space. Each snapshot is a full system backup that can be browsed with a file manager.

In BTRFS mode, snapshots are taken using the in-built features of the BTRFS filesystem. BTRFS snapshots are supported only on BTRFS systems having an Ubuntu-type subvolume layout (with @ and @home subvolumes).

Timeshift is similar to applications like rsnapshot, BackInTime and TimeVault but with different goals. It is designed to protect only system files and settings. User files such as documents, pictures and music are excluded. This ensures that your files remain unchanged when you restore your system to an earlier date. If you need a tool to back up your documents and files please take a look at the excellent BackInTime application which is more configurable and provides options for saving user files.

History

Timeshift was originally developed and maintained by Tony George.

His original repository is still available on Github.

Nowadays Timeshift is part of the Xapp project which is a collection of cross-DE and cross-distributions applications which are maintained by Linux Mint.

Features

Minimal Setup

Multiple Snapshot Levels

Rsync & BTRFS Snapshots

It is strongly recommended to use BTRFS snapshots on systems that are installed on BTRFS partition. BTRFS snapshots are perfect byte-for-byte copies of the system. Nothing is excluded. BTRFS snapshots can be created and restored in seconds, and have very low overhead in terms of disk space.

User Data is Excluded by Default

Timeshift is designed to protect system files and settings. It is NOT a backup tool and is not meant to protect user data. Entire contents of users' home directories are excluded by default. This has two advantages:

You can selectively include items for backup from the Settings window. Selecting the option "Include hidden items" from the Users tab will back up and restore the .hidden files and directories in your home folder. These folders contain user-specific config files and can be included in snapshots if required.

Note: It is not recommended to include user data in backups as it will be overwritten when you restore the snapshot.

System Restore

Cross-Distribution Restore

Post Restore Hooks

Supported System Configurations

Installation

Building and Installing from Source Code

You can find the exact instructions in the development docs.

Debian-based Distributions

Debian, Ubuntu, Linux Mint, Elementary OS, etc.

Install Timeshift from the repositories:

sudo apt-get update
sudo apt-get install timeshift

Fedora

Fedora is not fully supported. BTRFS snapshots only support Ubuntu-specific layouts.

sudo dnf update
sudo dnf install timeshift

Arch

sudo pacman -S timeshift

Removal

Run the following command in a terminal window:

sudo apt-get remove timeshift

or

sudo dnf remove timeshift

or

sudo pacman -R timeshift

depending on your package management system.

Remember to delete all snapshots before un-installing. Otherwise the snapshots continue to occupy space on your system. To delete all snapshots, run the application, select all snapshots from the list (CTRL+A) and click the Delete button on the toolbar. This will delete all snapshots and remove the /timeshift folder in the root directory.

Known Issues & Limitations

BTRFS volumes

BTRFS volumes must have an Ubuntu-type layout with @ and @home subvolumes. Other layouts are not supported. Systems having the @ subvolume and having /home on a non-BTRFS partition are also supported.

Text file busy / btrfs returned an error: 256 / Failed to create snapshot can occur if you have a Linux swapfile mounted within the @ or @home subvolumes which prevents snapshot from succeeding. Relocate the swapfile out of @ or *@home, for example into it's own subvolume like @swap.

Disk Space

Timeshift requires a lot of disk space to keep snapshot data. The device selected as snapshot device must have sufficient free space to store the snapshots that will be created.

If the backup device is running out of space, try the following steps:

Bootloader & EFI

Contribute

You can contribute to this project in various ways: