TimeShift – Provides System Restore functionality in Ubuntu

Sponsored Link
TimeShift for Linux is a 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 later to bring your system to the exact state it was in at the time when the snapshot was taken.

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.


Minimal Setup

TimeShift requires very little setup. Just install it, run it for the first time and take the first snapshot. A cron job will be enabled for taking automatic snapshots of the system at regular intervals. The backup levels can be selected from the Settings dialog.

Snapshots are saved by default on the system (root) partition in path /timeshift. Other linux partitions can also be selected.

Boot Snapshots

Boot snapshots provide an additional level of backup and are taken 30 minutes after the system is started.

Hourly, daily, weekly and monthly levels can be enabled if required.

Better Snapshots and Rotation

TimeShift runs at regular 30-minute intervals but takes snapshots only when needed.

Applications like rsnapshot rotate a snapshot to the next level by creating a hard-linked copy. Creating a hard-linked copy may seem like a good idea but it is still a waste of disk space. This is because only files can be hard-linked and not directories. The duplicated directory structure can take up as much as 100 MB of space. TimeShift avoids this wastage by using tags for maintaining backup levels. Each snapshot will have only one copy on disk and is tagged as "daily", "monthly", etc. The snapshot location will have a set of folders for each backup level ("Monthly", "Daily", etc) with symbolic links pointing to the actual snapshots tagged with the level.

System Restore

Snapshots can be restored either from the running system or from a live CD. Restoring backups from the running system requires a reboot to complete the restore process.

Cross-Distribution Restore

You can also TimeShift across distributions. Let's say you are currently using Xubuntu and decide to try out Linux Mint. You install Linux Mint on your system and try it out for a week before deciding to go back to Xubuntu. Using TimeShift you can simply restore the last week's snapshot to get your Xubuntu system back. TimeShift will take care of things like reinstalling the bootloader and other details. Since installing a new linux distribution also formats your root partition you need to save your snapshots on a separate linux partition for this to work.

Excluded Files

TimeShift is designed to protect system files and settings. User data such as documents, pictures and music are excluded by default. This has two advantages:

You don't need to worry about your documents getting overwritten when you restore a previous snapshot.
Your music and video collection will not waste space on the backup device.

Install timeshift in ubuntu 13.10/13.04/12.10

Open the terminal and run the following commands

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo aptitude update
sudo aptitude install timeshift





Sponsored Link

You may also like...

10 Responses

  1. DjB says:

    Well, i installed timeshift and it showed me that first snapshoot need 8,1GB. I have 25GB free space on my HDD where i planned to store snapshots. I clicked Backup and it filled up whole 25GB until i had 0 bytes free space. What’s up with that? I removed timeshift and deleted timeshift snapshot folder.

  2. DREP says:

    I’d really like to use timeshift, but it modifies my crontab entries — such that all entries are deleted, only timeshift’s own remaining.
    How to stop this unwanted behaviour?

    THANKS for consideration!

  3. xstriga says:

    How can i change the save directory “/timeshift” ?

  4. Leo says:

    Timeshift cannot be installed on 14.04 LTS, is that correct?

    sudo aptitude update
    sudo aptitude install timeshift

    Both the message “command not found”

  5. Stevedude says:

    Timeshift is not a part of the Ubuntu Repository so your method won’t work. Use the following to install:

    sudo add-apt-repository ppa:teejee2008/ppa
    $ sudo apt-get update
    $ sudo apt-get install timeshift

  6. gdh says:

    In 14.04 I get a “cannot add ppa” message. Any suggestions?

  7. Paul Mahieu says:

    Broke my network connections and slowed machine (Ubuntu 16.04, AMD6x cpu, 8gig ram) not recommended

  8. Tom Austin says:

    On Mythbuntu 12.04, Timeshift does not allow me to save on an external hard drive. The drive shows up in the list of storage devices, but the mounted drive is not selectable.

  9. Tom Austin says:

    Correction: (Mythbuntu 14.04, not 12.04. ) Timeshift does allow external drives, and they must contain a Linux partition. When I posted before, my external drive had a NTFS partition. I formatted it to Linux and it works fine with Timeshift.

  10. Ali Jauhiainen says:

    I have external drive with ext4 partitioning and timeshift doesn’t allow me to select that drive.

Leave a Reply

Your email address will not be published. Required fields are marked *