Brief : This articles briefs about the importance, features and steps to install timeshift in Ubuntu or any other Linux distributions in details.
Most of us Linux enthusiasts believe in “learn as you go”. So we play with a new installation, we do all our troubleshooting and the urge to install from a unverified source sometimes takes over sanity. Result? We end up with a broken system. It’s not always this worse, sometimes we just want a fresh restart, or when a software breaks the system, we just want to revert back in a week old’s timeline when everything was working fine.
Windows provides a solution for it – Windows System restore. Any Linux distribution has a different approach – learn about the problem and search for a solution. It works for advance users but when a beginner faces the problem, the only option left is to reinstall from scratch that loses your settings and data. Well, we do have another option – Timeshift.
A github project which started long back, and now maintained by Linux Mint, Timeshift works similar to Windows System Restore. It has two modes – rsync + hard links and BTRFS mode. In the first mode, snapshots are taking using rsync and hard links, and common files are shared between different snapshots. This saves disk space but each snapshot in itself is a complete back up and can be used to restore your system. In BTRFS mode, snapshots are taken using built-in BTRFS filesystem feature. If you are new to this, select the first mode.
Timeshift features
Let see what Timeshift offers :
- Very little set up. We are going to see the steps to install Timeshift in Ubuntu in details below, but it’s hardly going to take you 5 minutes to install and create your first snapshot.
- Snapshots can be scheduled easily to run on daily / weekly / monthly or any other interval you want.
- The default path is /timeshift.
- Timeshift was originally intended for restoring system and not your files and folders. It does have the option to include hidden files (which includes app settings usually) and personal data but using the third option means your files will be overwritten the next time you restore, which I am pretty sure you don’t want. We will talk about it too below.
Installing Timeshift in different Linux Distributions
Timeshift is part of Xapp project maintained by Linux Mint. It was started by an individual but it’s a big project now. You can install it in any Linux distribution using below steps.
For Ubuntu, you can search it in the AppStore and a debian package will pop up. You can install timeshift in Ubuntu from here.
If you are using a different distribution, or you want to do it the old way, feel free to fire up a terminal and use below command.
Debian based
sudo apt install timeshift
Fedora
sudo dnf install timeshift
Arch
sudo pacman -S timeshift
If you are not happy with it, you can simply remove it using below commands.
sudo apt remove timeshift
sudo dnf remove timeshift
sudo pacman -R timeshift
Use home directories has 3 options
Exclude All Files
Include only hidden files
Include all files
Once installed and launched, you will get a one-time set up wizard. Select Snapshot type.
In the rsync mode, snapshots are taken using rsync and hard links, and common files are shared between the snapshots to save disk space. In the BTRFS mode, snapshots are taken using the BTRFS file system. BTRFS is supported on only systems having an Ubuntu-type subvolume layout.
In the next screen, it will ask for the Snapshot location. Make sure you have sufficient free space, the first snapshot is going to be bulky. It’s always advisable to install and take a snapshot after a fresh install.
In the next screen, it asks for the frequency of back up. You can set up daily, weekly, monthly.. and since it’s an incremental back up, only the first one is going to take most of the space.
In the next screen, it asks whether you just want to back up the system files and not personal data, include only hidden files or back up everything.
It is advisable to go for the second option – Include only hidden files. Hidden files usually have the apps setting sand customization details. Selecting Include All Files is not recommended, as when you will try to revert back your system, it will over ride files from an old snapshot. I am sure you don’t want to lose your current data at any cost. That’s it, set up is complete.
Now, launch Timeshift and lets take a back up. This is what the homescreen looks like.
Click on Create and it will take some time to create your manual back for the first time.
Right, we have successfully taken a back up of our fresh installed system for future.
That’s it. Timeshift is an incredible piece of software that allows us to fix our mistakes. We have seen how we can install timeshift in Ubuntu and other Linux and how we can back up our system.
I am wrapping up with that now, cheers.