Page 3 of 4

Re: Timeshift and the Settings

Posted: Tue Sep 22, 2020 11:30 pm
by SteveR
MrEen wrote: Tue Sep 22, 2020 7:19 pm
Pjotr wrote: Tue Sep 22, 2020 3:15 pm
SteveR wrote: Tue Sep 22, 2020 2:55 pm I read it, but obliviously not fully comprehending. :?:
In that case I'm sorry, because I can't make this difficult matter clearer than that....
I never understood how this works myself. The way I interpret what Pjotr's site has is this:

When you delete the first snapshot (while newer snapshots exist) all you're actually deleting is the list (the links) not the files themselves.

Is that more or less correct?

And I believe an inspection of the location where snapshots are stored would give a clue on this. i.e., deleting the first snapshot didn't clear up as much space as it gobbled up when creating it. (emphasis added)
Now that I understood. :D

Re: Timeshift and the Settings

Posted: Tue Sep 22, 2020 11:38 pm
by MrEen
SteveR wrote: Tue Sep 22, 2020 11:30 pm Now that I understood. :D
With luck, I was accurate in my assessment! :D

Re: Timeshift and the Settings

Posted: Wed Sep 23, 2020 2:32 am
by Petermint
When you delete the first snapshot (while newer snapshots exist) all you're actually deleting is the list (the links) not the files themselves.
The list is the directory entries pointing to inodes by number. An idnote points to the file extents. So long as there is a directory entry pointing to a file, the file remains. When the last directory entry is deleted, the inode is deleted which means the file is deleted.

For Backintime, deleting old snapshots is different. You might want to go back to the last snapshot in the previous financial year to retrieve a spreadsheet you accidentally deleted.

Then there is the directory from the 1980s you might have deleted years ago to save space. It contains the only pictures of your favourite children/puppy/motorcycles when they were still new. :shock:

Re: Timeshift and the Settings

Posted: Wed Sep 23, 2020 4:16 am
by Pjotr
MrEen wrote: Tue Sep 22, 2020 7:19 pm The way I interpret what Pjotr's site has is this:

When you delete the first snapshot (while newer snapshots exist) all you're actually deleting is the list (the links) not the files themselves.

Is that more or less correct?
Well, very roughly, yes. Files only get deleted once they're no longer on any existing "list" (one or more of the later snapshots).

Of course this is only an imperfect analogy, blah blah blah. But it's a useful way to make clear, or at least as clear as possible, that all snapshots can be deleted in random order, without any snapshot deletion having any effect at all on the remaining snapshots.

Re: Timeshift and the Settings

Posted: Wed Sep 23, 2020 2:00 pm
by MrEen
Thanks Pjotr.

I mostly "get it" now. :D

Re: Timeshift and the Settings

Posted: Fri Nov 20, 2020 12:21 pm
by HoskaPamma
I tried to figure out what schedule settings would make sense and ended up with 1 monthly, 2 weekly & 3 daily snapshots. Fast forward a bit, I ended up here and read that 2 monthly snapshots is enough. I have no experience with this but for some reason I feel like it would make sense to make snapshots more often.

Anyways, I then tried to figure out how much space the actual snapshots (I now have M / W / D / D / DW) are taking right now (to make some adjustments to my snapshot schedule if the snapshots take too much space). This turned out to be difficult. Every folder in /run/timeshift/backup/timeshift/snapshots/ says about 11,x GB, totalling about 55 GB, which is the same number as the "System Monitor - File Systems" says for the partition (it also lists the timeshift "fake device" with the same GB). Is there a way to see how much space the snapshots actually take?

EDIT: My home folder has 3,7 GB of files, and that folder is excluded from snapshots (default), so I'd expect to see at least that much difference in the actual space used by the root partition and with the snapshots (on same partition).

BTW. I have a big swapfile (22 GB, for hibernating + swap) in "/", is timeshift taking a snapshot of that too?

Re: Timeshift and the Settings

Posted: Fri Nov 20, 2020 1:33 pm
by Pjotr
HoskaPamma wrote: Fri Nov 20, 2020 12:21 pm I have no experience with this but for some reason I feel like it would make sense to make snapshots more often.
What reason?

Re: Timeshift and the Settings

Posted: Fri Nov 20, 2020 3:25 pm
by HoskaPamma
All I wanted to know if there is a way to see how much space the snapshots actually take? It's odd that the Timeshift program doesn't tell you that. EDIT3: Ok, found Disk Usage Analyzer that seems to show the actual space taken by snapshots. 5 snapshots take 18,7 GB. I'm fine with that now. I guess it might fluctuate so I might check on it again later.

EDIT: And also: I have a big swapfile (22 GB, for hibernating + swap) in "/", is timeshift taking a snapshot of that too? EDIT2: /swapfile is excluded automatically by Timeshift.

Re: Timeshift and the Settings

Posted: Sat Nov 21, 2020 1:23 am
by HaveaMint
Pjotr was leading you with a question by asking Why do you feel you need so many snapshots of the system. I only have it do one snapshot monthly on my machines. Even if it gets messed up on day 29 just before the next snapshot is scheduled to run it doesn't take much time to bring the updates back to present on it. The Only reason I can see one wanting more snapshots is if they are on a metered internet connection, then you may want more.

Re: Timeshift and the Settings

Posted: Sun Nov 22, 2020 6:33 pm
by foberle
Sorry to beat a dead (well, actually still live) horse, but I've read through reams and reams of discussion regarding Timeshift, and am still very confused. So in order to convince myself that I've got a sufficient enough grasp to trust Timeshift (and even delete some of the snapshots), can anyone comment on the following observations:

In the location assigned to an rsync-type Timeshift (and named /whatever/whatever/timeshift), there are several major subdirectories.

The first major subdirectory (alphabetically) is 'snapshots', which contains one date-stamped subdirectory for each of the snapshots listed in the Timeshift GUI.

There are a number of other major subdirectories for each type of snapshot created, namely snapshots-boot, snapshots-daily, snapshots-hourly, snapshots-monthly, and snapshots-ondemand. Taken together, the total number of date-stamped subdirectories under these five equals the number under /whatever/timeshift/snapshots.

In my case, I only create snapshots on demand, so the number and NAMES of the dated subdirectories in timeshift/snapshots-ondemand and those in timeshift/snapshots are identical.

Based on some of what I'd read, I initially suspected that the timeshift/snapshots subdirectory contains backup copies (not links) of actual operating system files on this machine at the time the first snapshot was created, and that the corresponding dated subdirectories in timeshift/snapshots-ondemand contain EITHER nothing but LINKs to the files in the snapshots subdirectory if the files are unchanged, OR actual FILEs in cases where they are different than the one of the same name in the snapshots subdirectory.

Comparing the directory and file sizes between the timeshift/snapshots-ondemand and those in timeshift/snapshots, however, seem to suggest that they are identical to each other. (i.e. I saw no links other than those that already existed on the OS itself, though I'll admit I didn't do a thorough examination.)

So, what purpose is the timeshift/snapshots directory serving? And where are the file "backups" themselves? Many past discussions of this subject even on this forum have convinced me not to throw out the term "repository," but somewhere there must be backup copies of the actual OS files (otherwise, what purpose does it serve?).

Or am I missing the point of Timeshift entirely? Is Timeshift not actually a "backup" (incremental or otherwise, and, yes, I know it isn't intended for user files and such) program at all, and only intended to recover from OS updates that "break" something.

Thanks for listening ...

Re: Timeshift and the Settings

Posted: Sun Nov 22, 2020 7:38 pm
by Pjotr
foberle wrote: Sun Nov 22, 2020 6:33 pm in order to convince myself that I've got a sufficient enough grasp to trust Timeshift (and even delete some of the snapshots)
Don't overthink it; it's not worth the effort. What you need to know is this: Timeshift is merely a tool for repairing a broken system. Practically nobody needs to have more than two Timeshift snapshots for repairing a broken system. That's all.

This may help to clarify:
https://easylinuxtipsproject.blogspot.c ... t.html#ID7
(item 7)

Re: Timeshift and the Settings

Posted: Wed Jan 27, 2021 7:23 am
by Menard
I am a new Timeshift user, 3 weeks and I allready get problems with it
7 years with Clonezilla Live : no problems

Now I ve just recovered from a bad shutdown, thanks to Timeshift used from the Mint installation Device and thanks to this forum, but I see on the journal, this :

Code: Select all

PC1 systemd[1]: kerneloops.service: Found left-over process 1105 (kerneloops) in control group while starting unit. Ignoring.
PC1 systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.


so it is not exactly as if I had used Clonezilla Live ... :!:

And as I had chosen to install a encrypted home partition (I am new with both) I understand that I could have lost my data, so I d advice to people to use Clonezilla if they choose a encrypted home

This because Mint by default don't support the no swap mode ... and a memory deal that would allow not to have to shutdown hard

Re: Timeshift and the Settings

Posted: Wed Jan 27, 2021 8:58 am
by Lady Fitzgerald
Pjotr wrote: Sun Nov 22, 2020 7:38 pm
foberle wrote: Sun Nov 22, 2020 6:33 pm in order to convince myself that I've got a sufficient enough grasp to trust Timeshift (and even delete some of the snapshots)
...Practically nobody needs to have more than two Timeshift snapshots for repairing a broken system...
I somewhat disagree with this. There have been rare occasions when I had to go back to a third snapshot to correct a problem (usually one I stupidly created) that showed up later on. I keep no more snapshots than what will fill up the default Timeshift window. When the window fills up, I have Timeshift delete roughly half of the old snapshots, although, out of habit from my Windows days, I (probably unnecessarily) keep the first snapshot. I can keep on using the computer while Timeshift is deleting so I don't worry about how long it takes. I can't see having the extra snapshots causing any problems and I'm the type of person who would rather have something and not need it than to not have something, then need it.

Re: Timeshift and the Settings

Posted: Wed Jan 27, 2021 9:07 am
by AZgl1800
Lady Fitzgerald wrote: Wed Jan 27, 2021 8:58 am
Pjotr wrote: Sun Nov 22, 2020 7:38 pm
foberle wrote: Sun Nov 22, 2020 6:33 pm in order to convince myself that I've got a sufficient enough grasp to trust Timeshift (and even delete some of the snapshots)
...Practically nobody needs to have more than two Timeshift snapshots for repairing a broken system...
I somewhat disagree with this. There have been rare occasions when I had to go back to a third snapshot to correct a problem (usually one I stupidly created) that showed up later on. I keep no more snapshots than what will fill up the default Timeshift window. When the window fills up, I have Timeshift delete roughly half of the old snapshots, although, out of habit from my Windows days, I (probably unnecessarily) keep the first snapshot. I can keep on using the computer while Timeshift is deleting so I don't worry about how long it takes. I can't see having the extra snapshots causing any problems and I'm the type of person who would rather have something and not need it than to not have something, then need it.
You can liken this to the Spare Tire in your car.....
a lot of people have one that has never been used, but still, it is tucked away hidden somewhere ( or not ).
What did it cost to carry that Spare Tire/Tyre? nothing, but OMG is it ever useful if required.

I too, keep my snapshots within the default Window Size. Auto-Daily covers my arse if I make a stupid mistake.
A few manuals to document some special event that occurred, or was about to occur.

Re: Timeshift and the Settings

Posted: Wed Jan 27, 2021 9:16 am
by APSchmidt
I also set Timeshift to run daily and I keep seven snapshots, plus the first one I did after installation (on demand). They are all stored on a separate partition set on an also separate drive, just in case. You might think "it's using both a belt and suspenders but, well, I sometimes had to go back in time after making choices I regretted so I'm happy like that.

Now, why seven? Well, weeks have seven days so... ;)

Re: Timeshift and the Settings

Posted: Wed Jan 27, 2021 9:34 am
by Lady Fitzgerald
AZgl1500 wrote: Wed Jan 27, 2021 9:07 am
Lady Fitzgerald wrote: Wed Jan 27, 2021 8:58 am
Pjotr wrote: Sun Nov 22, 2020 7:38 pm

...Practically nobody needs to have more than two Timeshift snapshots for repairing a broken system...
I somewhat disagree with this. There have been rare occasions when I had to go back to a third snapshot to correct a problem (usually one I stupidly created) that showed up later on. I keep no more snapshots than what will fill up the default Timeshift window. When the window fills up, I have Timeshift delete roughly half of the old snapshots, although, out of habit from my Windows days, I (probably unnecessarily) keep the first snapshot. I can keep on using the computer while Timeshift is deleting so I don't worry about how long it takes. I can't see having the extra snapshots causing any problems and I'm the type of person who would rather have something and not need it than to not have something, then need it.
You can liken this to the Spare Tire in your car.....
a lot of people have one that has never been used, but still, it is tucked away hidden somewhere ( or not ).
What did it cost to carry that Spare Tire/Tyre? nothing, but OMG is it ever useful if required.

I too, keep my snapshots within the default Window Size. Auto-Daily covers my arse if I make a stupid mistake.
A few manuals to document some special event that occurred, or was about to occur.
I love that spare tire/tyre analogy.

I don't do Auto-Daily backups because I read somewhere shortly after coming to Mint that occasionally, if something is going on in the OS while the snapshot is being taken, it could result in the snapshot being corrupted. How true that is, I don't know enough to say, but I feel better being safe rather than possibly sorry later on. Instead, I make a manual snapshot once a week and, as you do, before doing anything that has the potential of gumming up the works. It doesn't take long to just sit there while Timeshift churns out a snapshot.

Just forf (forf? :roll: stupid fat fingers) excrement and merriment, I made an image just to see how long it took. It took a minute from the time I clicked on the Timeshift icon and finished annotating the new snapshot. Big deal! Even with my ??ADHD, that's not a problem. On the weekly snapshots, I also make one on an external drive for a backup. That takes a minute and a half since I have to connect the drive and change location in Timeshift's settings, then disconnect the drive and restore Timeshift's settings. Again, big deal. I have yet to need a snapshot on the external drive but, again, better safe than sorry.

However, overall, what one does boils down mostly to personal preference.

Re: Timeshift and the Settings

Posted: Tue Feb 02, 2021 11:16 am
by SteveR
An FYI for Backing-Up to a USB flash drive (solid state). Evidently there is a significant time delay between what appears to be the "end" of the backup and when it actually completes. Right after the backup "completes", I go to change the backup location from the USB flash drive back to its default location on the hard drive only to find that Timeshift appears unresponsive. Additionally, even-though the backup appears completed, I get a message that I can't eject the USB flash drive because it is "busy". Waiting a while solves these concerns. Just one of those idiosyncrasies.

Re: Timeshift and the Settings

Posted: Tue Feb 02, 2021 12:20 pm
by AZgl1800
SteveR wrote: Tue Feb 02, 2021 11:16 am An FYI for Backing-Up to a USB flash drive (solid state). Evidently there is a significant time delay between what appears to be the "end" of the backup and when it actually completes. Right after the backup "completes", I go to change the backup location from the USB flash drive back to its default location on the hard drive only to find that Timeshift appears unresponsive. Additionally, even-though the backup appears completed, I get a message that I can't eject the USB flash drive because it is "busy". Waiting a while solves these concerns. Just one of those idiosyncrasies.
there is a LOT of overhead that has to be completed before all of the Write Buffers have been cleared out.
Never, ever, pull a USB drive out unless you have verified that it is not being "used" or "written to".

I always use "Disks" anymore, to verify that the drive has been "powered down"
Pull a USB drive out while it is being written to, is a guaranteed method to destroy all of the file headers on it. You will be crying a lot to discover that all of those backup images are not any good :twisted:

Re: Timeshift and the Settings

Posted: Tue Feb 02, 2021 5:13 pm
by Petermint
You can run the sync command to force the write of all the buffered data. Wait until the sync command returns before removing the USB stick.

Re: Timeshift and the Settings

Posted: Tue Feb 02, 2021 5:57 pm
by Lady Fitzgerald
I just open up the external USB drive/partition I want to shut down, right click on the drive/partition in the left hand pane, click on Safely Remove Drive, then wait until the message in the upper right hand corner of the screen says the drive can be safely unplugged.