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 2
Level 2
Posts: 99
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: 15285
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: 1267
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: 15926
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 Ulyana
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: 15285
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: 15926
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 Ulyana
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: 779
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: 70
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: 15926
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 Ulyana
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Post Reply

Return to “Tutorials”