Introduction
In today's world, where data loss can occur by hardware failure, human error or malware attack, having a reliable backup tool is essential. Timeshift has become one of the most popular options for Linux users who want to protect their operating system and return to an earlier state within minutes. This article explores in depth what Timeshift is, how it works, its operating modes, how to install it and use it from both the graphical interface and the terminal, and offers good practices to ensure that your snapshots are useful and safe.
What is Timeshift?
Timeshift is an open source application designed to create snapshots of the real-time file system, similar to the features of «System Restore» Windows or macOS machine time tools. Its main objective is to allow system restoration to an earlier point without affecting the user's personal files, but it can also include such data if it is configured like this. Timeshift works at the partition level and uses underlying technologies such as RSYNC or BTRFS to generate copies.
How Timeshift works
The process of creating a snapshot involves copying the data from the selected partitions to a designated storage location, usually another partition or an external disk. Timeshift does not make full copies each time; instead, it uses an incremental approach that only saves changes from the last instant, which saves space and time. Depending on the file system of the target partition, Timeshift can use:
- RSYNC: copy files and directories, creating an identical file structure in the destination. Each snapshot is a complete copy but hard links are used to avoid duplicating data without change.
- BTRFS: It takes advantage of the native subvolumes and snapshots capabilities of the BTRFS file system, creating almost instant snapshots and very space efficient.
Installation in different distributions
Timeshift is available in the repositories of most Linux distributions. Next, the typical commands to install it:
- Ubuntu / Linux Mint:
sudo apt update && sudo apt install timeshift - Debian:
sudo apt-get install timeshift - Fedora:
sudo dnf install timeshift - Arch Linux:
sudo pacman -S timeshift - openSUSE:
sudo zypper install timeshift
After installation, you can launch Timeshift from the application menu or runningtimeshiftin a terminal.
Operating modes: RSYNC and BTRFS
When starting Timeshift for the first time, the assistant will ask you to choose the type of snapshot and partition where they will be saved. It is important to understand the differences:
- RSYNC: works with any ext4, xfs, etc. It requires enough free space in the target partition and creates snapshots through hard links. It's the most universal option.
- BTRFS: only available if the root partition (or the one you want to protect) is formatted with BTRFS. Snapshots are practically instant and consume very little additional space, as they only record changes.
Select the mode that best suits your configuration and space requirements.
Use of the graphic interface
Timeshift's graphic interface is intuitive and designed for users who prefer to avoid the command line. The basic steps are:
- Open Timeshift and authenticate with your administrator password.
- In the main window, click «Create» to generate a new snapshot.
- Select the target partition and confirm.
- Wait until the process is over; the progress bar will show the estimated time and size of the snapshot.
- To program automatic snapshots, go to «Settings» → «Programming» and activate the time, daily, weekly or monthly options according to your preference.
The list of snapshots appears on the bottom panel, where you can see the date, type and size of each, as well as options to delete or explore the content.
Use from the command line
For administrators or users who prefer the terminal, Timeshift offers clear commands. Some useful examples are:
- Create a manual snapshot:
timeshift --create --comments "Copia antes de actualización" - List all the snapshots:
timeshift --list - Restore a specific snapshot:
timeshift --restore --snapshot '2024-09-15_12-30-00' - Remove an old snapshot:
timeshift --delete --snapshot '2024-08-01_09-15-00' - Start automatic programming:
timeshift --schedule
These commands can be integrated into maintenance scripts or cron tasks to ensure regular backup without manual intervention.
Good practices and advice
- Store the snapshots on a different disk than the operating system to protect them from hardware failures.
- It regularly reviews the space available in the target partition; RSYNC snapshots can grow quickly if many versions are preserved.
- It uses descriptive comments when creating manual snapshots to facilitate its later identification.
- Combine Timeshift with backup of personal files (e.g. using rsync or tools like Deja Dup) for comprehensive protection.
- In BTRFS systems, consider activating compression and deduplicate to maximize space efficiency.
- Try the restoration on a virtual machine or a test disk before relying on it in a productive environment.
System restoration
When the system presents problems, Timeshift allows a simple return to an earlier state. From the graphic interface, simply select the desired snapshot and press «Restore». The process will restart the equipment and implement the necessary changes. From the terminal, the commandtimeshift --restoreexecute the same operation. It is important to note that the restoration affects the selected file system; personal files located in excluded partitions will remain intact, unless you have decided to include them in the snapshot.
Conclusion
Timeshift stands out as a robust, flexible and open source solution for the protection of Linux systems. Whether you are a home user who wants tranquility in the face of risky updates or a server manager who needs to reverse changes quickly, Timeshift offers the tools needed to create, manage and restore snapshots efficiently. By understanding their modes of operation, following good practices and integrating it into your maintenance routine, you can significantly reduce the risk of data loss and minimize inactivity time against unexpected incidents.


