Timeshift and the Settings

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Stoof2010

Re: Timeshift and the Settings

Post by Stoof2010 »

Sorry for my ignorance, but when I go to users tab, /root is excluded. Don't you want /root in your backup?
Or should I leave it unchecked?
Or is "/root" different than the "/" where my OS lives?
HaveaMint
Level 6
Level 6
Posts: 1085
Joined: Fri Feb 02, 2018 9:56 pm

Re: Timeshift and the Settings

Post by HaveaMint »

Leave it unchecked, those are users and not the system.
"Tune for maximum Smoke and then read the Instructions".
Stoof2010

Re: Timeshift and the Settings

Post by Stoof2010 »

HaveaMint wrote: Mon Oct 14, 2019 2:55 am Leave it unchecked, those are users and not the system.
Thanks!!
I've been checking them because I thought it was my OS!!!
If all stays stable I'll delete everything I have besides first backup and change it
Thank you.
SteveR
Level 3
Level 3
Posts: 167
Joined: Fri May 24, 2019 12:02 pm
Location: Morehead City, NC
Contact:

Re: Timeshift and the Settings

Post by SteveR »

Thanks for this excellent tutorial. It resolved a subtle concern that I had, which seemed to be unaddressed. The point below requires highlighting.
All files are copied when first snapshot is created. Subsequent snapshots are incremental. Unchanged files will be hard-linked from the previous snapshot if available.
Stoof2010

Re: Timeshift and the Settings

Post by Stoof2010 »

Ok so what I do now is if I'm going to drop old snapshots I delete them first then create my newest one. Not sure if I need to. Worried if I create one then delete older ones, that stuff will be missing since when I made the new one it was there then not there after when I deleted
HaveaMint
Level 6
Level 6
Posts: 1085
Joined: Fri Feb 02, 2018 9:56 pm

Re: Timeshift and the Settings

Post by HaveaMint »

Stoof2010 wrote: Sat Jun 27, 2020 5:58 am Ok so what I do now is if I'm going to drop old snapshots I delete them first then create my newest one. Not sure if I need to. Worried if I create one then delete older ones, that stuff will be missing since when I made the new one it was there then not there after when I deleted
There's no need to worry about which Timeshift snapshots you delete or in what order. Not even the very first snapshot needs to be kept; removing it won't affect the remaining snapshots.
"Tune for maximum Smoke and then read the Instructions".
User avatar
JTemple
Level 5
Level 5
Posts: 500
Joined: Thu Mar 05, 2020 12:42 pm
Location: Southern ON Canada

Re: Timeshift and the Settings

Post by JTemple »

HaveaMint wrote: Wed Jul 11, 2018 4:30 am Timeshift as many have explained is designed to create a snapshot of the file system only. It isn’t intended to be used to backup your personal files. Backintime or Grsync is a good tool to backup your personal files.
Backup Tool under Administration in the Menu File IS intended to backup personal files, apps and programs.
Backup Tool.png
The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt. “- Bertrand Russell (I suspect I'm often of the stupid variety!)
DustBunny
Level 1
Level 1
Posts: 3
Joined: Mon Sep 21, 2020 4:19 pm

Re: Timeshift and the Settings

Post by DustBunny »

HaveaMint wrote: Sat Jun 27, 2020 3:29 pm
Stoof2010 wrote: Sat Jun 27, 2020 5:58 am Ok so what I do now is if I'm going to drop old snapshots I delete them first then create my newest one. Not sure if I need to. Worried if I create one then delete older ones, that stuff will be missing since when I made the new one it was there then not there after when I deleted
There's no need to worry about which Timeshift snapshots you delete or in what order. Not even the very first snapshot needs to be kept; removing it won't affect the remaining snapshots.
This is what I've been wondering. When you delete a snapshot, is it merged into the remaining ones (ala VirtualBox where deleted snapshots are merged)? Timeshift's method of operation is described as initially taking a full sized snapshot of the system, followed by incremental backups from there on out. How can you delete the initial, full-sized backup while leaving the incremental backups restorable? Is there any documentation on how this works?
HaveaMint
Level 6
Level 6
Posts: 1085
Joined: Fri Feb 02, 2018 9:56 pm

Re: Timeshift and the Settings

Post by HaveaMint »

DustBunny wrote: Mon Sep 21, 2020 4:31 pm
HaveaMint wrote: Sat Jun 27, 2020 3:29 pm
Stoof2010 wrote: Sat Jun 27, 2020 5:58 am Ok so what I do now is if I'm going to drop old snapshots I delete them first then create my newest one. Not sure if I need to. Worried if I create one then delete older ones, that stuff will be missing since when I made the new one it was there then not there after when I deleted
There's no need to worry about which Timeshift snapshots you delete or in what order. Not even the very first snapshot needs to be kept; removing it won't affect the remaining snapshots.
This is what I've been wondering. When you delete a snapshot, is it merged into the remaining ones (ala VirtualBox where deleted snapshots are merged)? Timeshift's method of operation is described as initially taking a full sized snapshot of the system, followed by incremental backups from there on out. How can you delete the initial, full-sized backup while leaving the incremental backups restorable? Is there any documentation on how this works?
Here is a link that may help you on this.
https://teejeetech.in/timeshift/
"Tune for maximum Smoke and then read the Instructions".
User avatar
Pjotr
Level 24
Level 24
Posts: 20092
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Timeshift and the Settings

Post by Pjotr »

DustBunny wrote: Mon Sep 21, 2020 4:31 pm How can you delete the initial, full-sized backup while leaving the incremental backups restorable? Is there any documentation on how this works?
This is my attempt to clarify this:
https://easylinuxtipsproject.blogspot.c ... t.html#ID7
(item 7)
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
SteveR
Level 3
Level 3
Posts: 167
Joined: Fri May 24, 2019 12:02 pm
Location: Morehead City, NC
Contact:

Re: Timeshift and the Settings

Post by SteveR »

Pjotr wrote: Tue Sep 22, 2020 7:02 am
DustBunny wrote: Mon Sep 21, 2020 4:31 pm How can you delete the initial, full-sized backup while leaving the incremental backups restorable? Is there any documentation on how this works?
This is my attempt to clarify this:
https://easylinuxtipsproject.blogspot.c ... t.html#ID7
(item 7)
I am still having a concern with this. In your blog, you wrote: "There's no need to worry about which Timeshift snapshots you delete or in what order. Not even the very first snapshot needs to be kept; removing it won't affect the remaining snapshots." (emphasis added). Lets suppose this, the root partition gets totally clobbered. If there is no "first" snapshot, how can the system files be restored from Timeshift?

From my understanding, snapshots subsequent to the first (ie: #2, #3, etc) would only "save" the files that have subsequently changed. Files that have not changed subsequent to the first snapshot would not be saved. Therefore, if the first snapshot does not exist, unchanged files would not be available for restoration.
User avatar
Pjotr
Level 24
Level 24
Posts: 20092
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Timeshift and the Settings

Post by Pjotr »

SteveR wrote: Tue Sep 22, 2020 10:40 am
Pjotr wrote: Tue Sep 22, 2020 7:02 am
DustBunny wrote: Mon Sep 21, 2020 4:31 pm How can you delete the initial, full-sized backup while leaving the incremental backups restorable? Is there any documentation on how this works?
This is my attempt to clarify this:
https://easylinuxtipsproject.blogspot.c ... t.html#ID7
(item 7)
I am still having a concern with this. In your blog, you wrote: "There's no need to worry about which Timeshift snapshots you delete or in what order. Not even the very first snapshot needs to be kept; removing it won't affect the remaining snapshots." (emphasis added). Lets suppose this, the root partition gets totally clobbered. If there is no "first" snapshot, how can the system files be restored from Timeshift?

From my understanding, snapshots subsequent to the first (ie: #2, #3, etc) would only "save" the files that have subsequently changed. Files that have not changed subsequent to the first snapshot would not be saved. Therefore, if the first snapshot does not exist, unchanged files would not be available for restoration.
Well, I'm almost tempted to think that you didn't (entirely? carefully?) read my clarification on my website/blog. Because it's exactly that, what I try to explain there with an analogy.... :wink:
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
DustBunny
Level 1
Level 1
Posts: 3
Joined: Mon Sep 21, 2020 4:19 pm

Re: Timeshift and the Settings

Post by DustBunny »

Pjotr wrote: Tue Sep 22, 2020 7:02 am
DustBunny wrote: Mon Sep 21, 2020 4:31 pm How can you delete the initial, full-sized backup while leaving the incremental backups restorable? Is there any documentation on how this works?
This is my attempt to clarify this:
https://easylinuxtipsproject.blogspot.c ... t.html#ID7
(item 7)
OK now it's becoming clearer. The snapshots listed in the Timeshift GUI don't represent the actual underlying files but amount to, in simple terms, instructions on how to use the underlying files to restore the system when called upon to do so. What I originally didn't understand was that each differential snapshot must store *ALL* files that have changed since the original snapshot, not just the ones that have changed since the last differential backup. I assumed that each differential backup was saving just the difference between it and the previous differential backup.That would obviously lead to a massive dependency on all the previous backups.

All very interesting. Seems like black magic! :twisted:
User avatar
Pjotr
Level 24
Level 24
Posts: 20092
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Timeshift and the Settings

Post by Pjotr »

DustBunny wrote: Tue Sep 22, 2020 1:20 pm Seems like black magic! :twisted:
It is. :mrgreen:
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
SteveR
Level 3
Level 3
Posts: 167
Joined: Fri May 24, 2019 12:02 pm
Location: Morehead City, NC
Contact:

Re: Timeshift and the Settings

Post by SteveR »

Pjotr wrote: Tue Sep 22, 2020 10:46 amWell, I'm almost tempted to think that you didn't (entirely? carefully?) read my clarification on my website/blog. Because it's exactly that, what I try to explain there with an analogy.... :wink:
I read it, but obliviously not fully comprehending. :?:
User avatar
Pjotr
Level 24
Level 24
Posts: 20092
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Timeshift and the Settings

Post by Pjotr »

SteveR wrote: Tue Sep 22, 2020 2:55 pm
Pjotr wrote: Tue Sep 22, 2020 10:46 amWell, I'm almost tempted to think that you didn't (entirely? carefully?) read my clarification on my website/blog. Because it's exactly that, what I try to explain there with an analogy.... :wink:
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....
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Petermint
Level 9
Level 9
Posts: 2981
Joined: Tue Feb 16, 2016 3:12 am

Re: Timeshift and the Settings

Post by Petermint »

Seems like black magic!
It is minty green magic!

Actually it is Ext4 file system magic, which is black, white, and yellow Tux magic. The Ext4 file system allows links to represent files which lets Timeshift store a complete snapshot containing only changed files with links representing every other file. Occasionally there is a post about Timeshift or Backintime using massive amounts of disk space because they backup to NTFS or other file system.

Links provide other magic. You might have installed software PHP versions 5.5 and 7.0. Somewhere there is a link that says PHP -> PHP-7.0. Your Web experiments access PHP but magically get PHP-7.0 thanks to a link. Worth reading about file links.

In your case, using Java, you might have all 75,986 versions of Java installed and use a link to the only one that works. ( If there is one :D )
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Timeshift and the Settings

Post by MrEen »

Pjotr wrote: Tue Sep 22, 2020 3:15 pm
SteveR wrote: Tue Sep 22, 2020 2:55 pm
Pjotr wrote: Tue Sep 22, 2020 10:46 amWell, I'm almost tempted to think that you didn't (entirely? carefully?) read my clarification on my website/blog. Because it's exactly that, what I try to explain there with an analogy.... :wink:
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.
Petermint
Level 9
Level 9
Posts: 2981
Joined: Tue Feb 16, 2016 3:12 am

Re: Timeshift and the Settings

Post by Petermint »

More detail? https://opensource.com/article/17/6/lin ... filesystem

Uses for Timeshift? An upgrade, like LM 19.2 to 19.3, can fail. Manual snapshot before and after that type of update.

On occasions there will be ten system software updates mixed together. You apply all updates. One of them breaks something. You Timeshift back to before the update then test applying one update at a time. A weekly snapshot is enough for that.

MySQL is an example of software that digs into the system in strange ways. A botched MySQL install or upgrade can be easier to remove using Timeshift. Another case for before and after manual snapshots. In my experience, it is only MySQL, firewall configs, and attempts at manually compiling wireless drivers. You do not need it for Apache or Nginx or anything else.

On my notebook, I have external USB disks for backups and run Timeshift backups to those disks when I run Backintime backups. For software development projects, it is good to have both types of backup at the same point.

Desktop machines are easier. Just recycle an old SSD as an extra disk and timeshift to there.

What would be good is a script to clean out thumbnails, some of the cache directories, run trim, then timeshift then Backintime then shut down. Run it at the end of the day while you go off to shred the documents you scanned into wikileaks.
DustBunny
Level 1
Level 1
Posts: 3
Joined: Mon Sep 21, 2020 4:19 pm

Re: Timeshift and the Settings

Post by DustBunny »

Quite proper to give links their due as they make the whole process work so efficiently. Once you have the facts, the whole thing seems so simple but it's actually quite genius.

A couple of caveats I've found concerning Timeshift:
1) Veracrypt volumes are not recognized as a target by Timeshift even if formated ext4. However, LUKS encrypted volumes formatted as ext4 work fine.
2) Timeshift snapshot restore somehow overwrote the contents of a Veracrypt volume that was mounted during both backup and restore. This is a mystery as I can't find any of the contents of the Veracrypt volume in the snapshot. How do I know this happened? The restore snapshot was 4 days old. My popped-down mail is stored on a Veracrypt encrypted volume which I back up daily to a different drive than Timeshift. After the Timeshift restore rebooted, I mounted the Veracrypt volume, which exists on the root of my home directory, and opened my mail client and the newest mail was 4 days old (same age as the Timeshift restored snapshot). I dismounted the Veracrypt volume, restored it from my daily backup, re-mounted, opened my email client and the newest mail was 1 day old (the same age as the Veracrypt volume backup). There's nothing listed in the Timeshift snapshot at the mount point that the Veracrypt volume was on and I can't find any of its files in the Timeshift snapshot. So who knows?
Locked

Return to “Tutorials”