Timeshift for Linux 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.
The above paragraph is from Tony George's presence at GitHub.
@ December 18 2018
I am beginning a process of update and revision on this Thread. In one year a lot of things change, as we might expect. Editing and Revisions will appear highlighted, perhaps in bold italic, coloured font, or else in a box - or all of the aforementioned .
I may have to replace a video or two.
Hopefully the changes will be readily apparent, and I welcome your feedback.
Arch-based users (Manjaro in particular) take note of the revisions to the install method coming up soon.
Timeshift user for over 4 years
rsync – a Linux command used across all Families, and favoured by sysadmins for copying and synchronising files and directories (folders) across Linux/Unix systems, but also having application for the Home User. It stands for Remote Sync.
PPA – Personal Package Archive – a source on the Net for adding a repository to your system, for particular software, it then includes that software in notifying you of updates. Developed by Ubuntu, and is in Ubuntu, Linux Mint, and the like.
Clem – is Clement Lefebvre, Project Leader and Founder of Linux Mint.
Wizard’s Recommended Reading
I have listed my article on Aptik, above because Timeshift is from the same author – Tony George of teejeetech.in
– Tony works out of India, a hive of activity in the IT world. He is also the author of Conky Manager, an industry standard for the management of conkys.
Used (with Linux Mint 18.3 ‘Sylvia’ Cinnamon), which is on my /dev/sda28.
I have prepped for this exercise by creating a separate Partition as the target for Timeshift Snapshots. On my laptop this is /dev/sda32, but it could just as easily (even better) be on a totally separate physical HDD.
I have labelled the Partition “Shifted” so that it will appear as same in any of my File Managers. I have allocated 60 GiB to the partition, and, as a multi-multi-booter of Linux, I have placed it in a part of the drive whereby I can “grow” the partition, should I have need.
The 60 GiB partition has 1.12 GiB consumed in overheads from setting it up, leaving 58.88 GiB free.
Clem and his Team have taken, I believe, a forward step and released Mint 18.3 ‘Sylvia’ both Cinnamon and MATE editions with Timeshift shipping installed. I expect Xfce and KDE DEs to follow suit.
They are not the first to do so, as we will see in a future Post dealing with Manjaro (in particular, Manjaro ‘Strit’), but because of Mint’s high profile, I would expect other Distros to follow suit, just as many did in providing spins including the Cinnamon DE, which was Mint’s invention.
: Menu – Administration
: Menu – All Applications – System Tools
- Right-click and add it to your Panel and/or Favourites, you will use it regularly.
- If you are planning to save the Timeshift snapshot generated to a separate partition or drive, have at your fingertips the device name and number … in my case it will be /dev/sda32 which I have created earlier using GParted and has 60 GiB for multiple Distros to be shifted.
- Launch Timeshift and sign in. The first time it starts, the Wizard (not me) will appear. The default checked at top is RSYNC, leave it as that. If you do not know of BTRFS you do not have it, but by all means ask elsewhere.
It is worth reading this first screen, as you won’t see it again unless you actively choose to run the wizard. On completion, click Next.
4. Timeshift estimates the size required to take a standard snapshot. Older versions would tell you the space required, current version does not.
5. Timeshift then snaps to a screen showing the partitions on your drive, defaulting to the root partition you are on, in my case, /dev/sda28. If the estimated size of the snapshot to be taken exceeds the amount of free space available on the target location, Timeshift will warn you.
Here I change my snapshot location to the partition I prepared earlier and referenced at Step 3, that is /dev/sda32. Click Next.
6. This will bring us to Select Snapshot Levels. The default is set at Daily and each daily snapshot will be kept for 5 days (unless altered). I do not wish to have them performed daily, so I will uncheck this, and Timeshift will warn me.
I will be performing On Demand snapshots, we will see later depicted with an alphabetic “O”.
Leave “Stop cron emails for scheduled tasks” checked, unless you know what cron is (or anacron for that matter), but again, research elsewhere if you choose. Click Next.
8. This brings us to Setup Complete, and once again, have a good read through the bulleted points. The 3rd one, featuring mention of the files and folders not included by default
, is what I will be focusing on next.
Click Finish or close the window.
Making Sure You Get What You Want/Need
Completing the Wizard is not all we might have to do to run Timeshift successfully.
Closing the Wizard has brought us to a new, larger window. If we take a look at the named icons:
- Create, Restore and Delete are pretty self-explanatory, but we will use them all to see what is entailed.
- Browse allows you to actually take a look at the files and folders contained within the snapshot. This opens an instance of your File Manager (Caja for MATE, Nemo for Cinnamon) at the spot where the snapshot is stored, and the folder structure is that which you would obtain on your Distro by choosing “File System”.
- Settings will take us back to a greyish window like the Wizard, but with more options (Users and Filters)
- On the right, Menu includes an option to view Timeshift Logs.
Likewise the tabbed headers, in particular Comments, will be looked at.
- The first thing I focus on is Settings, and then choose Users. Why? Timeshift author Tony George does not pretend that Timeshift is a full backup solution. It is more like Windows Restore.
- In Users, I check all boxes (four of them). In this way, I ensure that my entire Home Folder is preserved, both data and settings. Bear in mind I do not use this folder for much, preferring external storage.
A number of the hidden folders and files are important, for my records.
3. Filters, then, shows us what we have chosen in Users, and gives us another chance to add, remove, or exclude more. When we are finished, press Close.
4. Now I am ready to Create a snapshot. Press Create. The initial estimates of time remaining may appear daunting, but as Timeshift builds up a head of steam, they reduce to a more desirable level. Times of less than 10 minutes are not unusual.
5. Once I see over 250,000 files have been saved I am in my comfort zone, because I know from experience that a number of my Distros have similar figures in their files. The process concludes with the Parsing of the log files.
We are back to the same screen or window, but now there is an occupant in the white pane, our snapshot, and it has a date and time so we do not need to duplicate that. System tells us the Distro that was captured (but with limitations I will explain soon), and Tags and Comments are of interest to us next.
M, W, D, H & B are as we saw with Select Snapshot Levels, and that is for Monthly, Weekly, Daily, Hourly, and at Boot. What was not
listed there, and what is not subject to a time-frame before being culled, is O for On Demand. I use this all the time.
6. Click in the Comments field, and you will find an insertion point is placed for ready entry of text. This field has multiple uses, as you will see over time. I find it good as a timechart of what I have done with the Distro, and have still to do.
Prior to running Timeshift, I had -
- Chosen & set my desktop wallpaper background
- Chosen my mouse cursor theme and size
- Installed some of my favourite additional apps
- Synced my Firefox
- Other customisations I employ to “feel at home” but
- Not yet run updates
So in Comments, I type something meaningful to me, such as “Cinn full > FF synced & B4 1st upd /dev/sda28”. Enter and the text is locked in place, but can be edited any time.
This is my own shorthand for describing the contents of this “shift shot” as being the Cinnamon flavour of the Distro described under System, taken at the date and time described under Snapshot (that is start time, not finish time – logs can reveal more), with Firefox OK, and with Updates still to be performed. My Distro is on /dev/sda28.
7. Now I am off to perform those Updates, and … I am back and ready to create, and label a Timeshift snapshot, which will be incremental
, that is, it will contain files and folders that have changed, or been created, since my last snapshot. I run that (only takes a short time because of the increment being relatively small) and label it, say, “Cinn DE - Updates incl New Kernel, incremental”
That is effectively all there is to it, if you are only using one Linux Distro on your computer. The video shows you reference points, and you can try it at home for yourself and get the hang of it.
Video 1 - Running Timeshift for the first time (plus incremental snapshot)
But wait, there’s more!
In subsequent Posts, and subsequent to comments from The Viewers and answering questions on what has been effected so far, I will be showing you :
- How important that Comments field can be, if you run more than one Linux
- How to restore your Distro, should disaster strike
- How to install Timeshift, on other than the new Linux Mints that ship with it, across a large number of Distros from different “Families”, including RPM-based, Arch-based, Gentoo-based, and more Debian-based than just Linux Mint alone.