You can create ‘System Restore Points’ in Debian/Ubuntu/Mint and all derivatives and restore to a previous system state by using a simple and easy to use free GUI tool TimeShift. Non-debian Linux OSes such as Fedora, openSUSE are also supported via installer.

You know, ‘System Restore’ feature in Windows operating system lets us make a restore point of system, program files and settings. You can use this restore point to return to the previous state when the point was created. This is no doubt a very useful feature since you can jump to an earlier working state of your Windows if something goes wrong with your current state that you can’t fix. Mac OS X has a similar feature which is called ‘Time machine’.

Sick Tux

As of Linux, since there are so many distros and vendors, there has always been lack of concentration to provide an universal user friendly tool/feature of System Restore like thing in Linux. Even if you find such built-in feature in your Linux distro, it seems to be only for that specific OS. But we are not out of hope. In recent years, many third party system backup tools for Linux have been poped-up and TimeShift is probably best of them.

What is TimeShift?

TimeShift window

TimeShift is a freeware GUI tool for Linux OSes which brings similar functionality like Windows System Restore and OS X Time Machine. It can create full system backup of your system files, installed programs and settings. Backups are indicated as ‘snapshots’ and you can restore a snapshot to a state when the snapshot was taken. You can take incremental snapshots at regular interval or on demand. It uses rsync and hard-links to create filesystem snapshots.

Note: TimeShift doesn’t backup your user/personal files. The purpose behind this is to keep the personal files unchanged. For backing up personal files, you can use Back in Time.

Uses of TimeShift

  • System Restore/Time Machine alternative for Linux.
  • You misconfigured something in Linux, got something broken and want to go back to previous state of correct setting.
  • You are unable to boot into the system.
  • You mistakenly removed a system file permanently and want to undo it.
  • Experiment with an unstable/another version of your Linux.
  • Birging back all old applications and settings to a new installation of Linux.
  • Cloning your OS to another PC completely.

Features of TimeShift

  • Easy to use and automatic job: It takes you very little setup. You can make on demand or automatic snapshots.
  • Snapshot on boot: Automatic Snapshots on every boot. Hourly, daily, weekly and monthly schedules can be added too.
  • Option for different backup location: You can choose other partitions too to save the snapshots.
  • Better Snapshots and Rotation: It runs at a regular interval but takes snapshots only when it finds necessary.
  • Live CD/USB support: You can use a live CD/USB to restore a Linux to which you can’t boot.
  • Exclude/Include options: You can exclude or include files and folders to get removed or included to the snapshots.

How to Install

  1. Open your Terminal or press Ctrl+Alt+T to quickly launch it.
  2. Type/paste the following commands and hit Enter one after another line at each prompt into Terminal. Remove the -y switch if you have trouble installing.
  3. Close the Terminal once the installation is finished.

For other Linux that is not based on Debian, follow the installation instructions at TimeShift page.

Using TimeShift

Creating and restoring a snapshot in TimeShift is as easy as deleting a file. First, search for the TimeShift in your Dash (depends on your distro/desktop environment, how you should search for it) and then open it. It should ask you for password. So enter your password.

Launch TimeShift

Backup Device section shows the partition to which the backup/snapshot will be saved. It also shows the total usage of the selected drive. If you move your mouse over the device, it will show you that the snapshots will be saved in the path /timeshift of the drive.

TimeShift backup device

You can choose other partitions to save your snapshots by clicking on the drive.

Change backup partition

Creating a Backup

To create a snapshot of current state, click on Backup button from toolbar.

Create a backup

It will then start to take backup of your system showing a message ‘Syncing files’ at bottom.

File sync process in TImeShift

Snapshots will be listed with date and time in name. Tags column indicates if a snapshots is taken On demand, boot, hourly or daily. The bottom status bar of the window shows the amount of free space, scheduled snapshot setting and the time of last snapshot.

Backup tags

From toolbar, you can use Settings to make TimeShift work the way you want. Schedule settings let you configure scheduled snapshots of timely level.

Snapshot creation schedule

The Auto-Remove settings lets you automatic removal of older snapshots to save your disk space.

Automatically remove old snapshots

Advanced tab lets you include or exclude files and directories which you want to be added or removed from the backup.

Exclude and include files and folders

The TimeShift directory contains all folders of snapshots of different levels. Clicking Browse button from toolbar will bring it quickly.

Timeshift snapshot folders

Every snapshot folder contains all your system files and folders as it was originally.

system directory backup

Note: It’s always recommended to keep copies of your TimeShift backups to other locations such as external drives, cloud storage, etc. so that you can face situations in case you Linux partition get broken.

Restoring a Backup

To restore a snapshot, select a snapshot and click Restore button from toolbar.

TimeShift restore button

You can choose different device as restore location from Restore window. Exclude and Advanced tab lets you customize the restoration by removing applications, files and folders from being restored.

TimeShit restore screen

You can also skip the bootloader installation if you are restoring a snapshot of same OS and version.

Restoring your Linux if you cannot boot to your System

  1. Download the Linux ISO file and burn it to a DVD/USB.
  2. Boot from it.
  3. After booting into live system, install TimeShift.
  4. Select the backup device where your previous backups were saved. Select the snapshot from available backup list and hit Restore button.
  5. In Restore window, select the partition to which you cannot boot (the partition where your original OS resides). You might want to install the Bootloader too. Click Restore to continue.
  6. After restoration, shut down the live system, remove DVD/USB and boot into your original Linux normally.

Conclusion

Thanks to Tony George of teejeetech.in who is behind this TimeShift software. Afterall, TimeShift is an extremely useful tool for all Linux users, specially for those who happen to experiment with unstable applications, beta releases of OS, change critical changes to system, etc. This can help anyone to recover and go back to their stable working state.

Sick Tux image source: kirakirayuki.tumblr.com.

Author: 

Jaber is a tech enthusiast, geek and web worm from Dhaka, Bangladesh. He is the founder and Chief-Editor of TechGainer. While he is away from his keyboard, either he's fishing or messing with wildlife. In case, you can contact him at rijans[at]techgainer[dot]com.