Timeshift 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. Timeshift is designed to protect only system files and settings User files such as documents, pictures and music are excluded. This ensures that your files remains unchanged when you restore your system to an earlier date.
Installing and running Timeshift
If not already installed on your system then search in Synaptic for timeshift to install Timeshift and its dependencies. Once installed you will find it on the start menu under Archiving->Timeshift. You will be prompted for the root password. Enter the root password to continue and you will then see the main Timeshift window.
At this point nothing is configured and so the first thing to do is click the Wizard button on the toolbar which will walk you through the process of configuring Timeshift snapshots. Timemshift just needs 3 pieces of information: The snapshot type, the location to store the snapshots and a schedule for taking snapshots.
On the first screen you choose the type of snapshot. Most users should select RSYNC as the snapshot type. 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.
Next Timeshift will estimate the amount of free space required for creating snapshots and then display a list of disks and partitions available on the system. You can store your snapshots on your main system drive/partition if you wish but if you want to treat your Timeshift snapshots as normal system backups you should choose a partition on a non-system (external) drive. Timeshift will store the snapshots under /timeshift on the selected partition.
Timeshift will warn if there is not enough free space available on the selected partition. The next screen enables you to choose a schedule for creating snapshots if you want to. Here you choose the frequency of the snapshots and the number of snapshots to keep. So on the screen below a snapshot is taken every week and we keep 2 snapshots which means we have the option of rolling back to last week or the week before.
The Boot option takes a snapshot after each reboot (after a delay of 10 minutes in order not to slow down the start up).
You can choose not to have scheduled snapshots by unticking all the options. In that case you would create snapshots yourself by clicking the Create button on the toolbar, perhaps before doing a system update.
The next screen controls whether the contents of user home directories are included or not. As explained earlier, Timeshift is designed to protect only system files and settings and so this should left to Exclude All Files. If user directories were to be included the size of snapshots could quickly get out of hand.
You can now click Next or Finish. Either way the setup is complete and you will be returned to the main screen. If you configured scheduled snapshots then the current status will be shown at the bottom of the window.
You can change any of the settings by clicking the Settings button on the toolbar.
That is all that is needed to set up Timeshift and you can now close the Timeshift window. If you have enabled scheduled backups then within the next hour or so Timeshift will create the first snapshot. Unlike similar tools that take backups at a fixed time of the day, Timeshift is designed to run once every hour and take snapshots only when a snapshot is due. This is more suitable for users who only have their systems switched on for few hours daily. Scheduling snapshots at a fixed time would result in missed backups since the system may not be running when the snapshot is scheduled to run. By running once every hour and creating snapshots when due, Timeshift ensures that backups are not missed.
The window lists the available snapshots. The system can be restored back the time of a snapshot by clicking a snapshot in the window and clicking the Restore button on the toolbar. Snapshots can be restored either from the running system (online restore) or from LiveCD/USB if the system is not bootable. Restoring snapshots from the running system requires a reboot to complete the restore process.