Timeshift & Similar Solutions - Safeguard & Recover Your Linux

/dev/nvme0n1 is the same as /dev/sda
/dev/nvme0n2 is the same as /dev/sdb

Typically SATA disks are designated as sdX.
m.2 type disks can be designated as either. But if the m.2 disk
is specifically NVME (full duplex) they can read and write at the same time.

I think fat32 will work for efi. but most of my distro's format this as winnt.
 


Thanks for that, d2u (is it just me or does that sound like R2D2?)

I was reading up on nvme last 24 so get that now.

What has me curious is that Jeffrey's external (I think 1TB SATA) drive where he houses his Timeshift snapshots shows with GParted as /dev/sda (#119) and then the new SSD with /dev/nvme0n1 is likewise the equivalent of /dev/sda.

Jeffrey, do you only plug in the external when you run Timeshift, and do you do so before booting or after boot?

Cheers

Wiz
 
Usually I just plug in the HDD when I want to save a timeshift. And I have been plugging in the drive after the system boots.
 
It would interesting to see the output of
fdisk -l from a console, ( sudo might be required)

Also the output of
df -h from a console. (I'm not sure how timeshift maps partitions).
 
fdisk -l from a console
Code:
jalan76@LGg17:~$ sudo fdisk -l
[sudo] password for jalan76:             
Disk /dev/nvme0n1: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 90409C74-F817-4C55-8D8C-D80EFE96532B

Device          Start       End   Sectors  Size Type
/dev/nvme0n1p1   2048    585727    583680  285M EFI System
/dev/nvme0n1p2 585728 195897343 195311616 93.1G Linux filesystem


Disk /dev/sda: 232.9 GiB, 250059161600 bytes, 488396800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disklabel type: dos
Disk identifier: 0x486280da

Device     Boot Start     End Sectors  Size Id Type
/dev/sda1  *        0 4083999 4084000    2G  0 Empty
/dev/sda2         644    5315    4672  2.3M ef EFI (FAT-12/16/32)

Partition 2 does not start on physical sector boundary.


Disk /dev/sdb: 931.5 GiB, 1000204885504 bytes, 1953525167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 94C6E804-2A6E-4C04-BF38-5CC7AADD2334

Device     Start       End   Sectors   Size Type
/dev/sdb1   2048 319490047 319488000 152.4G Linux filesystem
jalan76@LGg17:~$
 
Code:
jalan76@LGg17:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7.7G     0  7.7G   0% /dev
tmpfs           1.6G  1.6M  1.6G   1% /run
/dev/nvme0n1p2   92G   25G   62G  29% /
tmpfs           7.7G   96M  7.6G   2% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/nvme0n1p1  285M  6.1M  279M   3% /boot/efi
tmpfs           1.6G   40K  1.6G   1% /run/user/1000
pCloud.fs       500G   24G  477G   5% /home/jalan76/pCloudDrive
/dev/sdb1       149G  7.9G  134G   6% /media/jalan76/timeshift
jalan76@LGg17:~$
 
So it looks like you have 3 hard drives here.

/dev/nvme0n1: 931.5 GiB
/dev/sda: 232.9 GiB
/dev/sdb: 931.5 GiB

It looks like the first one is your primary system you were using when you typed these commands.
It appears you are only using about 95 GB of this disk. (That leaves over 800GB un-used)

The second disk is quite a bit smaller, only 230 GB or so.
What is a bit odd, is that you only have an EFI file system here, and a 2GB file system.
Are you using this disk for anything?

Finally you have /dev/sdb as your third disk.
I do see the timeshift partition on here.
/dev/sdb1 149G 7.9G 134G 6% /media/jalan76/timeshift

My guess is, this is where your timeshift files would be.
So to do a restore you need to go from /dev/sdb1 to /dev/nvme0n1p2

This appears to be your primary linux file system. /dev/nvme0n1p2

Is this where you want to restore to?
 
The “odd” drive w/ the efi is a 256 external ssd I was using for something else. The primary drive currently has LM 19.2 cinnamon and MATE since that seems to be the only distro I can get installed on to this laptop!! Damn ACPI error!!
 
acpi, is what tells you hard drive and monitor to go to sleep when you don't use it for a while.
"Usually" you can disable this in the BIOS/UEFI. Sometimes it has to be changed in two places.
For example, one of my PC's has an "auto power on" setting. I leave it turned on. If the power
goes out, I like it reboot on it's own without me having to manually power it on.
But if this is causing problems for you, you might want to see if you can turn it off.

I'm not trying to get you to change distro's. But at least you would have an option if you wanted to.
 
My thread currently trying to fix this problem

As @wizardfromoz can attest to I am a bit of a distro hopper and I like to multiboot on one machine. I was using Manjaro and Arch derivatives for a while but recently they seemed to be getting a bit "wonky" so I decided to migrate back to Debian based distros. Fast forward a bit, I purchased a LG Gram 17 in because I needed a lightweight laptop with a 17 inch screen. I love the laptop BUT I am having a heck of a time getting anything but LM 19.2 to boot! Searching has come up with a few hits regarding this problem (see other thread) but it seems to be a kernel issue since the 4.15-60 used by Mint is having no trouble but anything > 4.15 doesn't seem to work! If you have any insight into this please chime in!!
Thanks!
 
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.

AUTHOR'S NOTE

@ 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.

Chris Turner
wizardfromoz

Timeshift user for over 4 years

Wizard’s Glossary

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

https://www.linux.org/threads/aptik-have-settings-will-travel.4529/

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.


FIRST USE

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.


STAGE 1

STEPS


Find Timeshift

Cinnamon : Menu – Administration

MATE : Menu – All Applications – System Tools


  1. Right-click and add it to your Panel and/or Favourites, you will use it regularly.

  2. 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.

  3. 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.


STAGE 2

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.


STEPS


  1. 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.

  2. 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.
Cheers


Wizard

Chris Turner
Chris, This is a great article and your step-by-steps are clear and concise. The question I have is this, do I really need to partition my hard drive? This sounds useful, but I've not done it before so need to decide 1) How easy it is to make a mistake and murder my PC, and 2) is Granny the Geek capable of doing so? o_O Also, I'm doing this in preparation for adding Timeshift to my arsenal......
 
I have no memory of how big your main hard drive is.....it may be too small to partition and have it sharing Timeshift snapshots with the rest of your OS.........So my suggestion is to have an external hard drive to absorb all the Timeshift snapshots. Timeshift can take up quite a bit of room, depending on how many snapshots you have scheduled. Each Snapshot can be around 40 GB, each...so you need quite a bit of room.
 
Thank you Sue, that's kind of you. It has a little (lot) more banter in it than I would like for a Tutorial/How-To

Hello, Brian's hit the scene, I'm on to it, Mate - beer in one hand, smoke in another and the 3rd arm I grow for such occasions wields the mouse and keyboard

Wiz
 
use a straw for the beer....free up another hand....
 
Sue when you get a chance, the output of the Terminal command

Code:
inxi -DP

will tell us how you are situated for space

Wiz
 
I know where you live, and where you WILL be living
 
lolll........I was thinking of maybe a piece of garden hose.?......
 

Members online


Latest posts

Top