Timeshift snapshots

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
whois1230
Level 3
Level 3
Posts: 172
Joined: Mon Aug 28, 2017 5:35 am

Timeshift snapshots

Post by whois1230 » Sat Jul 14, 2018 5:15 pm

Hi, I'm wondering if I should keep all my timeshift snapshots or only leave the latest one, considering my system is running smoothly now. I think the earlier snapshots only waste hard disk space, but I could possibly be wrong. Any advice?

User avatar
MintBean
Level 9
Level 9
Posts: 2967
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: Timeshift snapshots

Post by MintBean » Sat Jul 14, 2018 5:28 pm

Snapshots share components that haven't changed between them to conserve space, so it might not waste as much storage as you guess. That said, I have a clean out from time to time and only keep the latest. If it's been running fine for a couple of days there's no reason to keep older ones.

User avatar
slipstick
Level 5
Level 5
Posts: 941
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Timeshift snapshots

Post by slipstick » Sat Jul 14, 2018 5:34 pm

In the settings menu, if you set the number of backups to keep, it will automatically delete the snapshots that are older. The only exception is the on-demand snapshots which will be kept until manually deleted. It might be useful to have some older snapshots, just in case there was a problem (possibly due to an update) that wasn't obvious and wasn't noticed for some time.
In theory, theory and practice are the same. In practice, they ain't.

User avatar
AZgl1500
Level 11
Level 11
Posts: 3558
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Timeshift snapshots

Post by AZgl1500 » Sat Jul 14, 2018 5:38 pm

I make a Baseline and never delete that one, because it contains a full copy of all the System files.

then I keep major updates via Manual and write in something that is meaningful.

I let AutoUpdate take care of the rest..... and only keep 3 daily updates, that is all I need.

all of the updates since the very last one, take up so little extra space, as to be totally unnoticeable in NEMO.
I forgot to write down the original gB left, but it is not much different than when I started.

do NOT erase them, you will cause more problems than the meagre disk space you think you save.
Take a look at the two pages, over two months of updates, and there is NO DIFFERENCE is how much disk space has been used.


this is the first page:
Timeshift.png

and this is the last page:


Image


you need to heed what the previous poster said:
" you need to keep some of the older snapshots "

I keep all of the Manual Backups, unless I did something that I don't like.

I make a backup just prior to a major install, name it:
then a make a backup after that major install, and name that:

and if the new fantastic piece of crap is just that, I delete the AFTER backup, and restore the PRIOR backup.
wallah, Piece of crap is gone.
worst comes to worst, I can go back to Day one....

whois1230
Level 3
Level 3
Posts: 172
Joined: Mon Aug 28, 2017 5:35 am

Re: Timeshift snapshots

Post by whois1230 » Sun Jul 15, 2018 8:16 am

How can I copy my snapshots on an external hard disk or USB? I want to reinstall Mint, encrypt my OS, and have the same programs and settings, but with a newer version of Mint.

User avatar
lsemmens
Level 9
Level 9
Posts: 2560
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: Timeshift snapshots

Post by lsemmens » Sun Jul 15, 2018 8:34 am

I understand the reasoning behind timeshift. My question is a little more newbie, than that. Does timeshift also work as a backup program or is it ONLY for system snapshots? If that is all, then, given the stability of my system, and the fact that I'm not afraid of blowing it all away and starting again if I stuff summat up, is there any advantage to it?
Kernel: 4.15.0-46-generic x86_64 bits
Desktop: Cinnamon 3.8.9
Distro: Linux Mint 19 Tara

Laptop HP-ProBook-470-G2 8Gb RAM SSD
Server AMD Phenom 9650 - GEForce 9400GT 6Gb RAM
+ three other Mint machines
Out of my mind - please leave a message

User avatar
MintBean
Level 9
Level 9
Posts: 2967
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: Timeshift snapshots

Post by MintBean » Sun Jul 15, 2018 8:45 am

AZgl1500 wrote:
Sat Jul 14, 2018 5:38 pm
I make a Baseline and never delete that one, because it contains a full copy of all the System files.
That's true, but EVERY snapshot contains a full copy of all the system files so you're quite safe to delete the original. A hard link to a file (which is what snapshots use to refer back to an earlier copy of a file that hasn't changed) is as good as the original file. You can delete the original and the hard link still retains the file. The actual data is not destroyed/lost until all hard links to it have been deleted. In fact, any file on an EXT4 partition is just a block of data with a hard link to it.

Still it's not a bad idea to keep a few snapshots for reasons previously mentioned.

To backup snapshots, copy the Timeshift directory to an EXT4 formatted backup disc. (Assuming you aren't running a BTRFS filesystem).

User avatar
MintBean
Level 9
Level 9
Posts: 2967
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: Timeshift snapshots

Post by MintBean » Sun Jul 15, 2018 8:48 am

Timeshift can be used to back up your user data (music, movies etc) but doesn't by default. There's a good reason for this - if an update borks your system, you want to be able to roll back the system WITHOUT reverting changes to your user files - like that document you've just spent a bunch of time updating.

If you're not bothered by reinstalling, you've no need of Timeshift- but you do need some means of backing up your user data,

gm10
Level 19
Level 19
Posts: 9677
Joined: Thu Jun 21, 2018 5:11 pm

Re: Timeshift snapshots

Post by gm10 » Sun Jul 15, 2018 8:51 am

lsemmens wrote:
Sun Jul 15, 2018 8:34 am
I understand the reasoning behind timeshift. My question is a little more newbie, than that. Does timeshift also work as a backup program or is it ONLY for system snapshots? If that is all, then, given the stability of my system, and the fact that I'm not afraid of blowing it all away and starting again if I stuff summat up, is there any advantage to it?
Timeshift can take snapshots of any data you want, theoretically you can use it to only back up your personal data. But it's really designed around restoring the system itself so another tool might be the better choice here.

Whether it has an advantage for you is up to you. Restoring a snapshot is certainly faster than starting over and/or trying to fix a problem manually. But maybe that's exactly the experience you are after. Up to you. :) Also Timeshift/rsync style backups aren't the only option for such a restore - I still like to keep a partition image around, for example, but those don't offer the incremental backups you get with rsync.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

User avatar
lsemmens
Level 9
Level 9
Posts: 2560
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: Timeshift snapshots

Post by lsemmens » Sun Jul 15, 2018 9:46 am

Thanks for that explanation, it works just as I imagined. I'm happy to work without it because any critical data is backed up off line anyway.
Kernel: 4.15.0-46-generic x86_64 bits
Desktop: Cinnamon 3.8.9
Distro: Linux Mint 19 Tara

Laptop HP-ProBook-470-G2 8Gb RAM SSD
Server AMD Phenom 9650 - GEForce 9400GT 6Gb RAM
+ three other Mint machines
Out of my mind - please leave a message

User avatar
slipstick
Level 5
Level 5
Posts: 941
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Timeshift snapshots

Post by slipstick » Sun Jul 15, 2018 1:05 pm

MintBean wrote:
Sun Jul 15, 2018 8:45 am
To backup snapshots, copy the Timeshift directory to an EXT4 formatted backup disc. (Assuming you aren't running a BTRFS filesystem).
If you just copy the TS directory, I think you will end up with multiple copies of most of the data, because each snapshot looks like a complete system backup - in other words, you lose the advantages of the hard-link structure. Your copied directory would be much larger than the original.

What I do is keep snapshots on my internal HD (monthly, weekly, daily, boot, on-demand, but not hourly). Then every day or two, I plug in my external USB drive and run a script file that uses rsync to back up the snapshots from my internal drive to the USB drive. The script file takes a long time to run (20-30 minutes) but seems to work and keeps all the links intact. Here is the script I use, which I launch from a launcher I made on my desktop:

Code: Select all

#!/bin/bash
#update timeshift backup on external drive from snapshots on internal HD

sudo rsync -aAuHXvis --progress --delete --numeric-ids /media/root/LM18_timeshift/ /media/steve/Z97_LM_Backup/LM18.3_timeshift_backup/timeshift | tee ~/timeshift_backup_log

echo "Finished updating timeshift backup"

sleep 10
exit 0
It starts by deleting all the snapshots from the USB drive that are not on the internal HD, then there is a long pause (10-15 minutes) with nothing apparently happening except for the blinking LED on the the USB drive, then it copies the new snapshots from the internal HD to the USB drive. You would need to change the source and destination in the rsync statement to match your system. It also keeps a log file in my home directory, which is not necessary and takes up a lot of room, but I like to have it to review. If you don't want it, just remove the "| tee ~/timeshift_backup_log" part of the command.
In theory, theory and practice are the same. In practice, they ain't.

User avatar
MintBean
Level 9
Level 9
Posts: 2967
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: Timeshift snapshots

Post by MintBean » Tue Jul 17, 2018 6:08 pm

slipstick wrote:
Sun Jul 15, 2018 1:05 pm
If you just copy the TS directory, I think you will end up with multiple copies of most of the data, because each snapshot looks like a complete system backup - in other words, you lose the advantages of the hard-link structure. Your copied directory would be much larger than the original.
On second thought, right you are.

Aside from rsync, there are some other ways to preserve hardlinks when copying, according to this. That said I think your rsync solution would be my preference.

Post Reply

Return to “Software & Applications”