Timeshift & Similar Solutions - Safeguard & Recover Your Linux



Nik-Ken-Bah

Well-Known Member
Credits
1,967
@wizardfromoz
G'day Chris
I just finally got 128Gig flash drive and entered the timeshift and created a snap shot, only took 5hours to do by the way.
But I later found that when I completely shutdown the computer it don't! It just sits there hanging but I noticed that the flash drive was flashing merrily away meaning that it was active,Is this normal?
Normally it shutdowns very quickly other times within a minute or two sometimes not often though.
The light is steady when passive, on standby.
I shutdown totally when I will not be using the computer due to having to do other things that living requires to be done.
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
15,848
Is this normal?
Define "normal", LOL.

G'day Davy, can you give us the output for (with the flash drive in place)

Code:
inxi -SMDPI

# if inxi not installed

sudo apt-get -y install inxi
Cheers

Chris
 
Last edited:

Nik-Ken-Bah

Well-Known Member
Credits
1,967

Condobloke

Well-Known Member
Credits
11,095
In timeshift restore window I note that it states it will keep /boot on root device(/dev/sda5)....and that it will keep /home on root device.

If the drop down (on /home) is opened it offers choices.....namely any of the rest of the drives on the pc

Obviously, I would wish to keep the /boot on the root device

However.../home .....If i was to restore and chose to send/home to another hard drive (which is something I wish to do at some point)(sdd1).....will it also alter the fstab thingie (technical term) so that the /home is 'seen'....maintains 'contact' with the rest of the os etc etc ??....or is that something I need to do as a separate action?

...And...assuming this is the uuid of the other drive in question....is this the appropriate change to be added to /etc/fstab ?

UUID=e087e709-20f9-42a4-a4dc-d74544c490a6 /home ext4 defaults 0 2

?
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
15,848
.....will it also alter the fstab thingie (technical term) so that the /home is 'seen'....maintains 'contact' with the rest of the os etc etc ??....or is that something I need to do as a separate action?
It should do, Brian :), but you'd have to try it, I haven't, yet.

I have my drives set up in the following fashion:

/dev/sda is the 2 TB HDD

/dev/sdb is the 256 GB SSD

/dev/sdc is the 4 TB Western Digital My Book, USB 3.0 connected, mains power

I have 3 ESPs (EFI System Partitions) of 512 MB each, one on each drive so that I can hot swap if necessary.

If I am wanting to test drive a Distro I install it initially on the SSD for fastest performance, and it house about 10 Distros and spare for one more.

The 2 TB HDD has about 30 Distros and the 4 TB another 30 or so.

When I want to try a new Distro and I need space on the SSD, I use Timeshift to shunt one off to one of the other drives.

When I "restore" the subject Distro to another drive (having already created an EXT4 partition of an appropriate size), I make any requisite alterations in Timeshift's choices, to the ESP to use in the new environment. As part of the restoration/redeployment, Timeshift runs a Grub reconfiguration and makes any change/s to /etc/fstab as needed.

That's in my usage of it.

Long story short I would advocate running it as you plan, see if it works and in particular if it changes fstab accordingly, whether it provides

UUID=e087e709-20f9-42a4-a4dc-d74544c490a6 /home ext4 defaults 0 2

or

/dev/sdd1 /home ext4 defaults 0 2

I advocate for the UUID because partition names can sometimes change.

Cheers

Chris
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
15,848
@Nik-Ken-Bah - Davy regrets on the time in getting back to you.

Before we reinvent the wheel, let's summarise where you are at, and correct me anywhere I am wrong:

You have the two (2) drives, /dev/sda which is the 2 TB Hitachi, and the 1 TB Seagate on /dev/sdb

You're running your "go to" Linux on /dev/sda1 on the Hitachi 2 TB.

Question: Is there 128 GB, or more, or less, free space on the Seagate? Or on the Hitachi, for that matter? Doesn't need to be unallocated space, but rather, unused space.

You could let us know with a screenshot from Gparted for each drive.

Reason I ask is that 5 hours for a Timeshift snapshot is just crazy, so you may be better served looking at an alternative and use the new 128 GB USB stick for other purposes.

See what you think.

Chris
 

Nik-Ken-Bah

Well-Known Member
Credits
1,967
free space on the Seagate?
Nah! She's apples mate I ain't going anywhere in a hurry;).
I do not trust this HD it is as it has had issues in the past plus it is over 10 ten years old and due for replacement that is a reason that I have not allocated it for Timeshift.
Yes the Hitachi is my main onboard HDD
Here is the snap from the Disc Utility for the Seagate HD and as you I have plenty of free space on it.
1615386532038.png


I do have another HGST 2.0 TB HDD sitting in my case spare just waiting to get a 2TB SSD to mount my OS's on and connect the all the HDD's up so that there will be 2 Disc HDD's and one SSD. I will do it all at the same time when I put this machine in to renew the heat-sink grease and the processor and the Video-card fans require a good cleaning.
 

Condobloke

Well-Known Member
Credits
11,095
Chris.....the exercise of moving /home to sdd1 worked via Timeshift but there was no movement in the fstab file......so I altered it myself.
The whole exercise was somewhat derailed by the fact that I received a notification that my main ssd was full. .....and.... the brian-desktop folder (home) in sdd1 was showing as empty.

I eventually discovered that in restoring a timeshift snapshot I had inadvertently chosen one from before the Printers's purchase (recent....last week or so).....and the pc could not find the printer so it continued sending error messages.....which accumulated sufficiently to gum up the works....fill the ssd.

I believe the Printer also adds a couple of instructions to the fstab file....I will pursue that thought later today. Edit....no it does not. The extra instructions in fstab are for the small pieces of the ssd which the Linux installer carved off (I think for grub....not sure)

For now the pc is running as it should.
I am going to abandon moving the home to sdd....there has to be a simpler solution?
Is it possible to make a copy of the config file?

To stop any drama with the file I entered in fstab, I simply put a # in front of the offending files??....I would like to tidy it up properly.
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
15,848
I am all for speedy solutions rather than reinventing the wheel.

I had occasion a couple of weeks ago to help a Member move $HOME from drive A to drive B.

I used as a reference a How To Geek article that actually had one small error in it which, while not fatal, could leave some parts a bit messy. I used it under the environment the Member was using, which was Elementary OS, and it worked fine.

I then contacted HTG and referenced the article pointing out the mistake, and both HTG and the author Dave McKay sent back emails to thank me and Dave corrected the article.

The Thread was here

https://linux.org/threads/taking-better-advantage-of-ssd-hdd-config-in-installation.32965/

and the HTG article, amended, is here

https://www.howtogeek.com/442101/how-to-move-your-linux-home-directory-to-another-hard-drive/

Do you want to give that a try?

Wiz
 

Condobloke

Well-Known Member
Credits
11,095
I have, in fact, already tried that one by Dave McKay.

It didn't function properly, mainly (I think) because I screwed up the .....(see below)

  • type the name of the partition at the start of the line, and then press Tab.
  • Type the mount point, /home, and press Tab.
  • Type the filesystem description ext4, and press Tab.
  • Type defaults for the mount options, and press Tab.
  • Type the digit 0 for the filesystem dump option, and press Tab.
  • Type the digit 0 for the filesystem check option.

Using gedit to edit the fstab file


Not sure what I did wrong....but I had that after feeling that all was not well
I used text editor (xed).....that was a mistake....yes?.....Update march 12: I just opened fstab in terminal with xed and got this:
** (xed:8952): WARNING **: 15:08:25.482: Set document metadata failed: Setting attribute metadata::xed-position not supported



Instead of cluttering up this topic, how about I start a new topic.......

""The Trials and Tribulations of moving the /home folder to an external hard drive""

Doth thou concur?
 
Last edited:

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
15,848

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
15,848
@Nik-Ken-Bah Davy - I would be inclined to carve off, on the drive you trust most a new Partition in EXT4, label it Timeshift, and use that, it will be way faster than the stick.

Maybe 100 GB maximum, and we can tweak how you take snapshots to accommodate them easily.

Is this your first use of Timeshift? Or if not, where are snapshots stored currently, eg in

/home/goldie/timeshift ?

Before you finalise this issue you may want to decide on the VMs issue elsewhere

https://linux.org/threads/a-query-about-virtual-boxes.33471/

Because by default, the Guest system (made under the VM) will occupy space in your $HOME folder or partition, so that is going to influence the size of Timeshift snapshots.

I'll swing over to that thread tonight or tomorrow.

Wiz

Avagudweegend.
 

Nik-Ken-Bah

Well-Known Member
Credits
1,967
the drive you trust most a
The one I trust is actually my main HDD the Hitachi and they say maintain your Time Shift on a separate storage device from the system.
From what I can remember I have never taken any Timeshift snaps. There is no files on the Seagate that are Time Shift related.
I am looking into another storage device but due to some issues with we have with the Missus's health so that takes precedent at the moment and obtain what I need when I am able to.
One thing I forgot to mention in the beginning is that the stick I am using for Timeshift is a USB 3 plug and I had that plug into a USB 2 socket which may have some impact on it as from what I can gather that USB 3 runs slightly faster than USB 2 Also the stick is a brandmark that I have never used before "Exceleram" as I prefer Sandisk, KIngston or Goodram
Apologise if this seems disjointed.
 

captain-sensible

Well-Known Member
Credits
11,418
i' ve not really been able to play with timeshift until now. Time shift is not available for slackware. Previously i had wifes laptop to play with installing endeavourOS and timeshift but it was so limited in capacity of ram and cpu it was basically i no goer.

Now i have on my laptop (modest capability) a dual boot system of both Slackware (current) and Vanilla Arch.

i've installed timeshift and created a snapshot but on gui its showing no snapshots available. see image

i selected a 64 gig usb stick to store snapshot and this is what i have :

Code:
[[email protected]:andrew/493c81e6-30bf-42da-8670-288dbe678ba1]$ sudo tree -L 2 timeshift/snapshots/2021-05-24_11-05-32    (05-24 12:01)
timeshift/snapshots/2021-05-24_11-05-32
├── exclude.list
├── localhost
│   ├── bin -> usr/bin
│   ├── boot
│   ├── dev
│   ├── etc
│   ├── home
│   ├── lib -> usr/lib
│   ├── lib64 -> usr/lib
│   ├── mnt
│   ├── opt
│   ├── proc
│   ├── root
│   ├── run
│   ├── sbin -> usr/bin
│   ├── srv
│   ├── sys
│   ├── timeshift
│   ├── tmp
│   ├── usr
│   └── var
└── rsync-log
Looking at config and timeshift its correctly has listed /dev/sdd1 (64gig usb) as snapshot location. So my question is :

1) why is it showing no snapshot
2) if i click on browse to location of snapshot what do i click on if i wanted to use it to restore ?
 

Attachments

Tolkem

Well-Known Member
Credits
6,398
Do you have any insight on how to run Timeshift from the Command Line? I could login by doing the "CTRL+ALT+F1" and then log in at the command line, but from there I don't know enough about Linux to find Timeshift and execute it.

Thanks!
I just "timeshifted" for the first time ever one of my systems when getting no desktop after an upgrade, rebooted to another system and came here looking for some guidance in this thread on how to "timeshift" from a TTY. I read the 12 pages and didn't see anything about that, rebooted again, jumped to a TTY, logged in and typed
Code:
man timeshift
. There's an option --restore, used with no options starts timeshift-cli in interactive mode, from there is just a matter of carefully reading the options and selecting them appropriately, so you should know exactly which snapshopt you want to restore your system to. To summarize:
From a TTY, log in and run
Code:
sudo timeshift --restore
You'll get something similar to this:
Code:
Select snapshot:

Num Name Tags Description
------------------------------------------------------------------------------
0 > 2021-05-08_19-05-52 O antes de actualizar KDE a 5.21.5
1 > 2021-05-09_08-48-22 O actualizado plasma-framework a 5.82 y qt a 5.15.2
2 > 2021-06-08_19-14-05 O antes de actualizar KDE a 5.22

Enter snapshot number (a=Abort, p=Previous, n=Next):
Just type the number for the desired snapshot, in my case that was number 2. Hit enter, It asked whether to reinstall grub, I chose not to since I'm in a multiboot system, though I'm not sure if when only 1 OS, yes option should be used. I hit enter again, and it started doing its magic. When finished, the pc rebooted and my system has a desktop again. So, that's how I did it and worked like a charm, I'm writing this from the recovered system. :)
By the way, I didn't before :rolleyes: but searching for "timeshift cli" returned this https://dev.to/rahedmir/how-to-use-timeshift-from-command-line-in-linux-1l9b though, maybe was for the better, otherwise I might have just chosen yes to reinstall grub, as that's what that post says to do. Phew! :D
 
Last edited:

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
15,848
Wow, that's legend, Hornet @Tolkem :) , I am going to digest that further over a coffee or three and before I get to the beer.

Thanks ever so much for sharing.

You can see why I liken Timeshift to a Swiss Army Knife, it has so many uses, and you have proven there is more than one way to skin a cat.

Andy @captain-sensible :

Time shift is not available for slackware.
Tony George's Releases page has a new look about it, you could try the following:

Scroll down to v19.01 and click where it says

Assets (6), screenshot follows



Download the .run file that suits your environment.

Then use it in conjunction with reading this article, and let us know how it goes.

https://alt.os.linux.slackware.nark...ckup-and-python-programming-on-slackware-14-2

Cheers
 

Tolkem

Well-Known Member
Credits
6,398
Wow, that's legend, Hornet @Tolkem :) , I am going to digest that further over a coffee or three and before I get to the beer.

Thanks ever so much for sharing.
My pleasure! :)

You can see why I liken Timeshift to a Swiss Army Knife, it has so many uses, and you have proven there is more than one way to skin a cat.
Yeah, it is indeed a great tool. The one feature missing is the ability to list and choose a snapshot in Grub to boot in read-mode only(a la snapper in openSUSE)so you can verify that it works and solves your issue, other than that, a really useful tool, very easy to use and fast as well; the whole restoring process took nothing but a couple of minutes. :)
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
15,848
That's two beers from the Aussie fans of Timeshift, Mate. ;)

I take your point about Snapper, it is a good tool, but one I have used seldom. I am planning soon to try it on some Debian-based and Arch-based Distros in my stable, and will report back.

Cheers

Wizard
 

Tolkem

Well-Known Member
Credits
6,398
That's two beers from the Aussie fans of Timeshift, Mate. ;)

I take your point about Snapper, it is a good tool, but one I have used seldom. I am planning soon to try it on some Debian-based and Arch-based Distros in my stable, and will report back.

Cheers

Wizard
Note that snapper doesn't support ext4, you need btrfs for it to work, and for the grub feature, openSUSE as it is the only one providing that for the moment with the pkg grub2-snapper-plugin, it's in Fedora's future plans https://fedoraproject.org/wiki/Changes/BtrfsWithFullSystemSnapshots#Scope, but for now, openSUSE is the only one with that specific, and should I add, awesome feature. Others distros can use this https://github.com/Antynea/grub-btrfs however, it seems it is only available in Arch's repos, others will have to build from source.
 
Last edited:
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online

Members online


Latest posts

Top