Timeshift and the Settings

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
SteveR
Level 3
Level 3
Posts: 101
Joined: Fri May 24, 2019 12:02 pm
Location: Morehead City, NC
Contact:

Re: Timeshift and the Settings

Post 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
User avatar
MrEen
Level 22
Level 22
Posts: 16918
Joined: Mon Jun 12, 2017 8:39 pm

Re: Timeshift and the Settings

Post 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
Petermint
Level 6
Level 6
Posts: 1318
Joined: Tue Feb 16, 2016 3:12 am

Re: Timeshift and the Settings

Post 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:
User avatar
Pjotr
Level 22
Level 22
Posts: 16237
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Timeshift and the Settings

Post 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.
Tip: 10 things to do after installing Linux Mint 20.1 Ulyssa
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
User avatar
MrEen
Level 22
Level 22
Posts: 16918
Joined: Mon Jun 12, 2017 8:39 pm

Re: Timeshift and the Settings

Post by MrEen »

Thanks Pjotr.

I mostly "get it" now. :D
HoskaPamma
Level 1
Level 1
Posts: 19
Joined: Thu Nov 12, 2020 8:27 pm

Re: Timeshift and the Settings

Post 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?
User avatar
Pjotr
Level 22
Level 22
Posts: 16237
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Timeshift and the Settings

Post 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?
Tip: 10 things to do after installing Linux Mint 20.1 Ulyssa
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
HoskaPamma
Level 1
Level 1
Posts: 19
Joined: Thu Nov 12, 2020 8:27 pm

Re: Timeshift and the Settings

Post 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.
HaveaMint
Level 5
Level 5
Posts: 803
Joined: Fri Feb 02, 2018 9:56 pm
Location: Somewhere in the USA
Contact:

Re: Timeshift and the Settings

Post 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.
"Tune for maximum Smoke and then read the Instructions".
foberle
Level 2
Level 2
Posts: 73
Joined: Fri Oct 13, 2017 4:52 pm

Re: Timeshift and the Settings

Post 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 ...
User avatar
Pjotr
Level 22
Level 22
Posts: 16237
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Timeshift and the Settings

Post 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)
Tip: 10 things to do after installing Linux Mint 20.1 Ulyssa
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Menard
Level 4
Level 4
Posts: 207
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: Timeshift and the Settings

Post 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
Linux Mint 20 64bits Cinnamon (Kernel 5.4.0-59)
AMD APU A8 7600 (3100 MHz to 3800 MHz) with DDR3 1833 MHz 4 GB x2
(CPU limited to 4x 3100 Mhz default by no support of the Turbo-core, then after editing grub, supports up to only 3700 MHz)
Lady Fitzgerald
Level 6
Level 6
Posts: 1089
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: Timeshift and the Settings

Post 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 Windoze 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.
Jeannie

Linux Mint Cinnamon 19.3 Cinnamon 64 bit
System 76 Serval WS (serw11) 17" Laptop
User avatar
AZgl1500
Level 15
Level 15
Posts: 5602
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Timeshift and the Settings

Post by AZgl1500 »

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 Windoze 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.
Linux Mint 19.3 Cinnamon
APSchmidt
Level 2
Level 2
Posts: 91
Joined: Mon Jul 13, 2020 5:25 am

Re: Timeshift and the Settings

Post 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... ;)
~$ inxi -Fxz
System:
Kernel: 5.4.0-64-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Xfce 4.14.2 Distro: Linux Mint 20.1 Ulyssa
base: Ubuntu 20.04 focal
Machine:
Type: Laptop System: Micro-Star product: GE62 6QF v: REV:1.0
Lady Fitzgerald
Level 6
Level 6
Posts: 1089
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: Timeshift and the Settings

Post 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 Windoze 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.
Jeannie

Linux Mint Cinnamon 19.3 Cinnamon 64 bit
System 76 Serval WS (serw11) 17" Laptop
Post Reply

Return to “Tutorials”