Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd please sign up again. Thanks!

Timeshift & Similar Solutions - Safeguard & Recover Your Linux

Discussion in 'Linux Other' started by wizardfromoz, Dec 12, 2017.

  1. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    456
    Likes Received:
    464
    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.


    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

    wizardfromoz
     
    #1 wizardfromoz, Dec 12, 2017
    Last edited: Dec 31, 2017
    Greghove, finrodfelagund_ and atanere like this.
  2. atanere

    atanere Moderator
    Gold Supporter

    Joined:
    Apr 6, 2017
    Messages:
    693
    Likes Received:
    592
    Great article, Chris!
     
  3. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    456
    Likes Received:
    464
    This next stage does not really require a video, as a screenshot should suffice.


    [​IMG]

    Screenshot 1 - Use of the Comments field

    The story to the above is as follows:

    I have two of Linux Mint 18.3 on this laptop. One with the Cinnamon DE (Desktop Environment) and one with the MATE.

    The video in my first post dealt with the Cinnamon on my /dev/sda28.

    Since then, I have performed the same procedures on the MATE one. It is on my /dev/sda1.

    Now, Timeshift, in my experience of a little over 3 years, is an excellent tool, and very clever. But it can't (yet) tell the difference between the different DEs of the same version of Linux. So you can see from above that under System, the descriptions are identical. This is where the Comments field becomes important. You can highlight and click or as the Smart Tip shows, just doubleclick any time, now or later, to edit this after the snapshot has been taken, and the details update in real time.

    Drag the window to the right if you think you have a lot to enter to describe your work (not halfway through like I did in the video, lol), and then enter what you need to know what you have captured and safeguarded, and press Enter when completed. I have not actually found the length limit to the Comments field, you might try yourself and let us know.

    At this point, a little under 16 Gigs of space has been expended to effectively back up two (2) full Distros, with their updates and a few chosen apps, and all my essential settings. I would call that a good investment. :)

    Coming up, what to do with these Timeshift snapshots, in the likely or unlikely event that you brick your Distro or something else bricks it for you, This will also be of interest to any of you whom has experienced, or might experience the phenomena of

    1. Kernel Panic and/or
    2. Being "welcomed" (NOT) on booting/rebooting your computer and being presented with a black and white screen featuring the dreaded grub> or grub rescue>
    Cheers

    Wizard
     
    #3 wizardfromoz, Dec 14, 2017
    Last edited: Dec 25, 2017
    Greghove, finrodfelagund_ and atanere like this.
  4. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    456
    Likes Received:
    464
    MANJARO AND TIMESHIFT

    I’m going to insert a video here that is pretty dated – all of about 37 days old, lol.

    It features what I was going to do initially with this thread, which was to start with Manjaro, and then move on to Debian-based, RPM-based &c … uses for Timeshift.

    The reason I veered from that course was because Clem & his Team released Linux Mint 18.3 ‘Sylvia’ the MATE and Cinnamon versions, featuring Timeshift preinstalled. So I changed direction to accommodate the Mint Users.

    Now I am back on track.

    So here without further ado is




    Video 2 - Installing Timeshift on Manjaro

    I have some notes to explain about the video and these are bonus for linux.org Members and viewers, as they do not appear on youtube, but if youtube viewers join here, they will be rewarded with more than just a little info from me.

    Manjaro is based on Arch, one of the quintessential DIY Distros. Manjaro has heaps of software in its own repositories, but also makes available those from Arch, known as AUR – Arch User Repository.

    Manjaro provide disclaimers and warnings about using the AUR … which I find a little odd – like Linux Mint (based on Ubuntu) saying Mint Repo stuff is OK, but watch out with Ubuntu … does not happen.

    Manjaro users may know that what works one day, or one release, may not work the next.

    So rather than print all the options to install Timeshift on Manjaro, try what is in the video, and if it does not work, post a question here, and I will answer. Or we will find an answer together.

    In the video, I go a few extra yards with referencing installs of Kazam and GTKHash, only as an example of how, along with perhaps installing your fave apps, tweaking Firefox &c, you get to a point where you want to safeguard your setup and not have to go through it all again.

    If you are using Manjaro as the only OS on your computer, you may well live happily ever after.

    I am not sure about dual-booting it with Windows (don’t use Windows), but if you choose to install another Linux on the same computer as you have Manjaro, Manjaro will fall over and refuse to boot because of a Kernel Panic.

    I will discuss the reasons for this elsewhere, but suffice it to say that by installing Timeshift on Manjaro, you have, not exactly the solution, but a viable workaround.


    Cheers

    Wizard

    Coming up next -

    1. How to recover and reinstall your Distro, whether it be the two (2) new Linux Mints, Manjaro, or any other Distro on which Timeshift is installed
    Following that will be methods of install for a number of the Linux Mint "Families".

    edited - typos
     
    #4 wizardfromoz, Dec 16, 2017
    Last edited: Dec 25, 2017
    Greghove, finrodfelagund_ and atanere like this.
  5. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    456
    Likes Received:
    464
    MANJARO AND TIMESHIFT

    Getting Down & Getting Dirty

    Let’s get our hands dirty and blow something away that has had a Timeshift snapshot taken.

    Suggesting that Timeshift is a good Recovery Solution is not much good if we don’t recover something.

    DISCLAIMER

    Don’t think for a moment that I am “bucketing” or “flaming” Manjaro. It is one of my Fave Distros :)

    BUT, as one of maybe 130 or more Linux I have installed and used, it is the most susceptible to falling over, for one reason or another.

    Therefore, IMO, Manjaro users are most in need of Timeshift, of any Linux users.

    But read the following anyway, even if you have no plans of using Manjaro, because what I describe can be employed in any and every Linux that can install Timeshift.

    BACKGROUND

    Kernel Panic, grub prompt grub>, grub rescue prompt grub rescue>

    ...the above are just a few of the phenomena that can cast a shadow over our enjoyment of Linux.

    We’ll look closer at the grub problems elsewhere and elsewhen.


    WIZARD’S GLOSSARY

    TLS – is an abbreviation I give to what I call “The Leaderboard Shuffle”, like a golf tournament.

    If you run two (2) or more Linux, on the same computer, or on a system with linked drives, you will experience it, sometime. It happens when a combination of the following cause the top position of your Grub Menu to change:

    • Installing a new Linux

    • Running updates and upgrades that include some combination of
      • Kernel upgrade

      • Firmware upgrade

      • New version of Grub

      • Removing or auto-removing old Linux kernels
    • other causes
    There are some Linux (PCLOS is one) that dig in their claws to the top spot and resist changing position. At the other end of the scale, Peach OSI is so “humble” that when you install it, say on /dev/sda10 or whatever, it does not assume the ascendancy, and leaves the previous leader in place.

    And there are ways and means of mitigating the effects or likelihood of these changes, and I will outline some of these in a future Tutorial on multi-multi-booting Linux.

    99.99% of Linux will allow for these changes without rancour. An exception is Manjaro.

    If Manjaro is at No. 1, and you install another Linux, then reboot, and the new Linux is at No. 1 … when you next boot and try to enter Manjaro, you will get


    KERNEL PANIC

    The message goes something like this:

    Kernel panic – not syncing : VFS: Unable to mount root fs on unknown – block (0,0)

    It includes some output on hardware names, such as your computer, in my case /Toshiba Satellite S70t-A/ Type 2

    It gives BIOS details, Call Trace outputs, and ends in

    end Kernel Panic (and repeats the not syncing &c message).


    One bricked Distro.

    There is a short-term fix for a Session, involving choosing an advanced option line out of Grub, but as I say, it only works for the Session and you have to repeat it each reboot.

    We’ll take a look at how Timeshift can act as a workaround.


    PREPARATORY STEPS

    I will first show you how the list of my Timeshift snapshots stands.

    [​IMG]
    SCREENSHOT 2 – Current Snapshots Kept

    You can see I was busy over those ten days, further, that I have only 6.5GB left of that 60+GB originally. These are artificial circumstances for purposes of these articles, though. I can either clean out unnecessary snapshots or expand the target partition, but you can see the argument for having a dedicated hard drive if you can afford one.

    PLAN

    My plan involves installing a Linux Mint 18.3 Xfce ‘Sylvia’ - the Xfce and KDE versions have become available since writing the initial Posts. These, like the MATE and Cinnamon editions, have Timeshift preinstalled.

    Currently, my Grub Menu has that Manjaro Linux sitting on top. It controls the Grub Menu and it is the one that by default boots after 10 seconds.

    I have prepared a 20 GiB partition, /dev/sda33 on my laptop, and it is on that I will install ‘Sylvia’ Xfce. If all goes according to plan, the Mint distro will perform TLS – The Leaderboard Shuffle. It will go to the head of my Grub Menu, and relegate the Manjaro back to its numerical position at /dev/sda30, near the bottom of the menu.

    Subsequent to that operation, if I then choose Manjaro from the revised Grub Menu, it should have its customary Kernel Panic and lock me out of booting it.

    I will then use Timeshift to restore a bootable Manjaro.


    Let’s see how we go?

    Cheers

    Wizard
     
    #5 wizardfromoz, Dec 22, 2017
    Last edited: Dec 25, 2017
    finrodfelagund_ likes this.
  6. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    456
    Likes Received:
    464
    MANJARO AND TIMESHIFT

    Back again, and true to form, Murphy’s Law applies, or I did not hold my mouth the right way, and the install of Linux Mint 18.3 ‘Sylvia’ with the Xfce DE did not perform TLS and take top spot … an Ubuntu would have (stupid Wizard), so would a Fedora.

    So I improvised.

    In Sylvia, I set my wallpaper, increased my mouse cursor size, made some of my usual tweaks to /etc/default/grub , set up my Terminal profile and disabled my touchscreen.

    I haven’t synced Firefox yet, nor run updates yet which include a Kernel Upgrade, but I have changed to my fastest update mirrors and set my update policy.

    I then used Sylvia Xfce’s inbuilt Timeshift to take a snap, and if I keep it around I will take an incremental snapshot to incorporate what I have just mentioned as remaining undone currently.

    The video which follows shows my method of attacking the issue at hand. Notes follow. The video is about 13 minutes long.



    Video 3 - Blowing away & restoring a Linux Mint

    So in summary, I


    1. Used GParted to remove Linux Mint 18.3 ‘Sylvia’ with the Xfce DE and its host partition, my /dev/sda33. The 20GiB space freed up was briefly returned to Unallocated Space. I then

    2. Used GParted to create a new partition in its place, same size and same partition number – the size and partition number do not have to be the same, I just choose to do it that way, but you do need to create a new partition, either elsewhere on your drive, or in the same spot. You can actually put the restored Distro onto a different drive, you will just need to make a couple of modifications.

    3. Then I used Timeshift’s Restore capability to restore Sylvia back onto my laptop.
    At around the 11 minute mark in the vid, you will see me pointing to “uploading the Bootloader Configuration”.

    This is an important part of a Timeshift Restore, and in particular to those whom use more than one Linux on the same system. When Timeshift restores Grub, it will place the finished product at the top of your Grub Menu. Timeshift does what the install itself of Linux Mint 18.3 did not, it performs TLS.

    Linux Mint 18.3 ‘Sylvia’ Xfce is now first entry on my Grub Menu. Mint has control of Grub, and it is the Distro my laptop boots into.

    I was aware of this, and it suited my purposes fine, because it pushed Manjaro back to its place in order, with its /dev/sda30, and sure enough, when I later tried to boot into Manjaro, the Kernel Panic I expected was there to greet me, :D

    I will show you how I can restore my Manjaro to working order again, and as a part of that process, we will see it resume its spot at the top of the Leaderboard, that is, first entry on my Grub Menu. Once again, it will be the Distro that my computer boots into, by default.

    Mint Xfce will be rearranged in the Menu down to its numerical spot at /dev/sda33, but, unlike the recalcitrant Manjaro in similar circumstances, it will continue to be bootable, should I choose to use it.

    By now, some of you will be perhaps champing at the bit to get a copy of Timeshift, so I will point you in the right direction, and then restore my Manjaro.

    Following that, we will look at how to install Timeshift on Distros that do not ship with it.

    Cheers

    Wizard
     
    #6 wizardfromoz, Dec 23, 2017
    Last edited: Dec 25, 2017
    finrodfelagund_ likes this.
  7. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    456
    Likes Received:
    464
    TIMESHIFT – SOURCES AND READING MATERIAL

    The best place to go, IMO, is at GitHub, here

    https://github.com/teejee2008/timeshift

    and Timeshift in its various forms, here, also at GitHub

    https://github.com/teejee2008/Timeshift/releases

    Author of Timeshift, as mentioned at the beginning, is Tony George, and Tony’s website is at http://www.teejeetech.in/

    It is worth taking a wander around, as Tony has other products you might take an interest in, such as Aptik (which I use), Conky Manager (which ships now with some Linux), and Selene, a media converter.

    If there is a criticism I have of Tony’s site, and some other references around the Net, it is that there is old material there, and old links.

    Timeshift is no longer available at www.launchpad.net , but there are some bugs reported there (which should be at GitHub) that might be worth a look.

    With the old material, make sure you are getting Timeshift 17, and not Timeshift 1.7 … Tony went through the series of 1.4 (which was when I started) through 1.7, which ended at end of 2015.

    In January 2016, he revised the numbering sequence to Timeshift 16 and so on. The latest versions are numbered Timeshift 17.11 and the Linux Mint 18.3 group have 17.11.2.

    At the first of my github references, you can read how to install Timeshift in various environments using various software formats, … .deb, .run, &c.

    I will however flesh these out here, to make this thread a one-stop-shop for easy reference.


    IMPORTANT NOTES FOR ALL TIMESHIFT USERS

    Tony George does not claim for Timeshift to be a full-fledged backup solution. He compares it to Windows Restore feature, and with Macintosh, Time Machine.

    He also pays kudos to tools such as Back in Time, which we will cover here, soon, unless someone is already using it, in which case, please contribute?

    I am providing, below, a screenshot from one of Tony’s points of presence, which features his idea of what to capture, and you may find it more useful than mine, in which I checked all the boxes. Here it is.


    [​IMG]

    Screenshot 3 – Tony George’s Settings

    Here you can see Tony has included

    • Hidden items, for his personal Home Folder and

    • All contents of his /root folder
    Let’s look at those hidden items.

    Below is a screenshot of my Home folder, a standard Home folder, on my /dev/sda4, which houses a Linux Mint.

    I show this one, because on it, I also have Mozilla’s email client, Thunderbird.

    First

    [​IMG]

    Screenshot 4 – Home - default

    This shows a standard Home Folder, with the default 7 – 9 folders, along with a couple of items I would want to save.

    HOWEVER, if we press Ctrl-h (or you can set this as a default in Preferences in many File Managers), we will see a number of files and folders which are hidden … this is denoted by their having a fullstop (dot/period) in front of the name.

    Here shown, the same folder, with all revealed.


    [​IMG]

    Screenshot 5 – Hidden Files and Folders Revealed

    A bit of a difference, isn’t there? I had to expand it to fit it all in.

    I won’t go into explaining all of them, that can be done elsewhere, but suffice it to say that:

    • If you use Firefox, your Default Profile and all your settings are in .mozilla

    • If you use Thunderbird, likewise … .thunderbird
    So in Tony’s screenshot, he is safeguarding all his Settings, and the contents of his /root folder.

    Me, I don’t keep all my Documents, my Music, my Pictures, my Videos … in my Home Folder, I store them elsewhere.

    But if you do, make provisions for them, and account for the space taken.

    BECAUSE

    When you restore a Timeshift snapshot, it overwrites files, any files you have edited or created since the last full snapshot, or incremental snapshot, can be lost.

    It does not prompt you eg “This file exists, do you want to skip or replace” and show date/filestamps, size &c.

    It is likely with that in mind that Linux Mint, in shipping Timeshift with all of their 18.3 series, now (Cinnamon, MATE, Xfce and KDE), still also include their Mint backup tool.

    Cheers

    Wizard
     
    #7 wizardfromoz, Dec 24, 2017
    Last edited: Dec 25, 2017
    finrodfelagund_ and atanere like this.
  8. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    456
    Likes Received:
    464
    TIMESHIFT – RESTORING FROM AN INCREMENTAL SNAP

    You’ll recall that I had put on a new “Mintie” (Linux Mint), and that, shy thing, it did not perform TLS and kick Manjaro out of the kingpin position, at the top of my Grub Menu.

    Further, that I then used GParted to blow away the Mint, and then restore it. In doing so, it concluded with updating my grub configuration, and placed the Mint at the top of the leaderboard, pushing Manjaro back to where its /dev/sda30 position was in order.

    Finally, that when I next tried to boot Manjaro, it had a sulk at having to share with others, and welcomed me with a Kernel Panic.

    Even Manjaro Forum’s users get annoyed at this phenomenon.

    In mid-September last, Stan (@atanere) and I were working extensively with @PcBuilderEd on getting Linux Mint installed on his SSD.

    At #52 here https://www.linux.org/threads/installing-lm-on-a-ssd.13200/page-3#post-45891 Stan mentioned an article as one of three articles linked to, the specific one was here.

    https://forum.manjaro.org/t/kernel-...-to-mount-root-fs-on-unknown-block-0-0/4620/6

    In that Forum, one Member mentioned, in part

    I first came across this article end of July, early August 2016.

    Manjaro has three (3) officially supported desktop environments available, and they are GNOME, Xfce, and KDE. But there are also a number of CEs (Community Editions) available, which include Cinnamon and Deepin. Deepin DE is the same used by the Deepin Linux Distro, where Deepin are Chinese Developers.

    Having worked my way through the 3 official Manjaroes and had them panic each time I added a “foreign” Distro, I tried out the Cinnamon CE in April 2016, same outcome, and then the Deepin in June/July 2016 – same outcome.

    When I found that Forum article, I realised at least I was not alone, lol.

    There are other options provided there and elsewhere for remedying the problem, but the underlying problem can only be solved by the Devs themselves.

    So to cut a long story short (oops, too late) I will use Timeshift to restore my Manjaro again.


    PREPARATION

    I have used old faithful GParted to blow away the contents of my /dev/sda30 where Manjaro resides. This, to establish tabula rasa “a clean slate” to put Manjaro back on fresh. As such, I have created a new, EXT4, /dev/sda30 the same size.

    The video shows the steps, and it is 3 minutes 15 seconds long. Following the video I have some explanatory notes.



    VIDEO 4 – Restoring Manjaro (or any Distro) from Kernel Panic; Use of incremental snapshot in this process

    NOTES

    Give yourself a Scout’s Merit Badge for keen observation if you have spotted between the videos and the screenshots of my snapshots kept, that having had my Timeshift dedicated partition shrink from 60 GiB to about 6, I expanded the partition using GParted, by another 20 GiB.

    Now you can address this shrinking space, obviously, I think, by either


    • Adding more space, as I have done, if you have available space, or

    • Culling, that is, deleting, snapshots you no longer need
    My current “State of the Nation” with snapshots is as follows, and I want you to look at the one highlighted, in particular.

    [​IMG]

    Screenshot 6 – Snapshots relevant

    You can see here, or you can revisit the video, and see that I restored Manjaro using not the full snapshot, described by Timeshift as “ManjaroLinux 17.06 (Gellivara)”, but rather from the incremental snapshot, described by Timeshift as “ManjaroLinux 17.1pre3 (Hakoila)”.

    Let me first say that the Manjaro distro is a “rolling release”, that is, it continually updates and upgrades, and if you so desire, you do not ever have to install a “new version” of Manjaro.

    So when I took the full snapshot, it was “Gellivara” 17.06, and then when I ran updates (which included a Kernel upgrade), it upgraded to 17.1 “Hakoila”.

    But it does not matter if you are using Manjaro or another Distro – if you have an incremental snapshot, it may be 100 MiB in size, or 10 GiB, you can use that to restore your Distro.

    Why? Because the incremental snapshots are “hard linked” to the snapshot taken before that.

    That means to say, very simply, and likely not technically correctly, that by using the incremental snapshot to start the Timeshift restore process, it then “calls on” the full snapshot to do its voodoo, and then add the incremental “new stuff” to complete the process.

    To do it the other way around, and begin with the full snapshot, it would run its course, but you would then have to run the incremental restore, to “get up-to-date”.

    Bottom line is:

    1. Keep your full snapshot

    2. Keep each subsequent incremental snapshot

    3. Use the comments to distinguish

    4. Restore from the most recent Incremental snapshot.
    … to cover yourself.

    In the end, my Manjaro is restored and at the top of my leaderboard, as the screenshot shows, all settings and updates safeguarded and restored.

    [​IMG]
    Screenshot 7 - Manjaro Restored


    Coming Up:

    1. Installing Timeshift in the various Linux Families and their associated Distros

    2. Running Timeshift from a Live Medium (DVD/USB stick) to restore
    Cheers

    Wizard
     
    finrodfelagund_ and atanere like this.
  9. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    456
    Likes Received:
    464
    In my previous Post, I concluded with:

    Coming Up:

    1. Installing Timeshift in the various Linux Families and their associated Distros

    2. Running Timeshift from a Live Medium (DVD/USB stick) to restore

    I have work nearly finished on Point 1., but for now, I want to just tell The Viewers about how to install Timeshift on Debian-based Distros such as Ubuntu, Linux Mints other than the 18.3 series (on which TS is already installed as a new feature), and others, which include, but are not limited to:

    • Peach OSI
    • Zorin OS
    • Pearl
    • Ultimate Edition
    • LXLE
    • Maui
    • and so on
    It does not apply to Debian itself, antiX, the MX series, nor Kali &c.

    I will explain about them further. For now, I have one of our Members I want to refer to this thread, and I am better keeping this altogether.

    Ubuntu, albeit based on Debian, introduced the concept of PPAs - Personal Package Archives. By installing a PPA, your buntu-based Distro then has access to all the software produced by that Developer or author. In the case of Timeshift, Aptik, Selene, Conky Manager and others, this is Tony George's PPA we are making available.

    PPAs, once added, incorporate into your Package Management System, usually "Synaptic", and so whenever you have updates generated and notified, these softare products are also included - there is no need to update them individually or manually.

    So with Timeshift, the instructions are as follows - you can actually copy and paste the entire three (3) lines into Terminal or Konsole (only one line might appear, but the rest will follow), or else execute them individually:

    Code:
    sudo add-apt-repository -y ppa:teejee2008/ppa
    sudo apt-get update
    sudo apt-get install timeshift
    Once you run that small script and let it play its course, then Timeshift will be available to you in your Menu, usually under Admin or System Tools.

    All for now, but a Happy & Safe New Year to you and yours, and I'll be back with much more on Timeshift in 2018.

    Cheers

    Wizard
     
    finrodfelagund_ likes this.

Share This Page