Timeshift and mount points

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
SuperBoby

Timeshift and mount points

Post by SuperBoby »

Hi everyone,

Though I am not new to Linux, I am new to Linux Mint ; and I came across something weird.

When I first installed the system, I activated right away the snapshots with Timeshift. I think it worked OK, but never opened Timeshift again to check.

Today at some moment, my system starts to get unstable. I wasn't doing anything critical at all, so I tried some things and finally resorted to rebooting. On the next reboot , lightdm started to loop the login phase, which gave away the problem thanks to BobSongs in this post : viewtopic.php?t=261704

So I went into tty, and $ df -h told me that / was COMPLETELY full. Not a single byte left. :shock:

So I started to # du -hs everything in / to find the culprit (without autocompletion, because apparently bash needs disk space for that :mrgreen: ). And /timeshift was the guilty directory. So I emptied it, restarted lightdm, disabled the scheduled snapshots and it was back to normal.


Then I digged some more into it.

This never happened before today, and I never touched any Timeshift settings since the installation. The one "mistake" I did related to this was to manually editing /etc/fstab to permanently mount my other partitions. I have in total 3 mounted partitions :
  • /dev/sda7 to /
  • /dev/sda6 to /localdisks/os1
  • /dev/sda8 to /localdisks/commonhome
It looks like Timeshift tried to include /localdisks in its snapshot, and of course, both those partitions are bigger than the root one. Hence the saturation caused by Timeshift.


I have several questions regarding this issue :
  • Was I wrong to manually edit /etc/fstab to make my permanent mount points ? Is there a Linux Mint way of doing it that I missed ? I'm asking this, because :
  • Shouldn't there be a disk usage threshold for timeshift ? It would default to the current available disk space, with a user setting on top of it to further restrict it if needed. Then, if Timeshift doesn't have enough space to do a snapshot, it should abort and trigger a warning.
If the answer to the first question is "yes", then, ok, Timeshift wasn't aware of my mount points and saw the directory as any other. But if it is "no", then shouldn't Timeshift automatically exclude external filesystems to its operation ?


Thanks for your time !
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
philotux

Re: Timeshift and mount points

Post by philotux »

One thing you could do is to mount the partitions in question under /mnt. By default, Timeshift will exclude /mnt/* (see: Timeshift-Settings-Filters-Summary).

Another thing is to dedicate a separate EXT-formatted partition (could be on an external drive) for Timeshift to store its snapshots on.
philotux

Re: Timeshift and mount points

Post by philotux »

You could actually add your own filters too for what to be excluded from the snapshots in Timeshift:Settings:Filters.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11173
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Timeshift and mount points

Post by AZgl1800 »

I have all of my backups including Timeshift on a separate partition, so the OS is never effected.
Timeshift might fail, but it won't because I watch it once in a while, and get rid of the older backups.

Setting up filters to negate something you don't want to be included is easy.

The ONLY automatic backups that I allow Timeshift to do, is 5 daily backups, always deleting the 6th one. so it stays at 5 Daily Backups.

I do a few Manual Backups, always just prior to installing new software....
and that is it....

Timeshift is a great tool, but it can be dangerous if allowed to run on the initial default settings.
Last edited by AZgl1800 on Wed Nov 21, 2018 8:10 pm, edited 1 time in total.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
SuperBoby

Re: Timeshift and mount points

Post by SuperBoby »

Thanks for your fast answers and recommendations.

I have indeed excluded the mount points from Timeshift when I realised that ; however I think it is a better practice for me to move my mount points under /mnt.

I have a subsequent question : let's say that my new /dev/sda6 mount point is /mnt/localdisks/os1. If I create a symlink /localdisks pointing to /mnt/localdisks, will it be automatically excluded from Timeshift under the default /mnt exclusion rule ?


Also, do you think it would be an interesting feature request for Timeshift to trigger a warning in case of disk space shortage ?
philotux

Re: Timeshift and mount points

Post by philotux »

I am not really sure about that. But I think the mountpoint ought to be excluded at any rate.
I can't tell :?
User avatar
AZgl1800
Level 20
Level 20
Posts: 11173
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Timeshift and mount points

Post by AZgl1800 »

I went ahead and specifically filtered out the /media/....../backup even though "it should be filtered out anyway"

Filter Timeshift.png

Gparted2.png
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
SuperBoby

Re: Timeshift and mount points

Post by SuperBoby »

Ok thanks for all your replies. I have opened a feature request for a warning for disk usage, because I think many other use cases would be benefiting from this.
User avatar
axisofevil
Level 4
Level 4
Posts: 382
Joined: Mon Nov 14, 2011 12:22 pm

Re: Timeshift and mount points

Post by axisofevil »

Why are there 3 (at least) supplied directories supplied for mounts?
/mnt
/media
/opt
Actually, /media seems to gets used by automount - although I'm not sure about that.

If you allocate a partition for timeshift and give it a label (so you can see what it is in gparted etc).
Mount it via fstab in /mnt as otherwise it will be automounted (like a USB stick) and very likely shown as a device on your desktop.
Example:-

Code: Select all

UUID=a83d70e0-bbf7-4810-8647-d7aa7472927d	/mnt/timeshift   ext4	rw,errors=remount-ro    0 0
A separate partition stops it writing over valuable data!
SuperBoby

Re: Timeshift and mount points

Post by SuperBoby »

Since I had the problem I indeed moved my timeshift directory to a separate partition, but thanks !

But even in this case, I think Timeshift should warn the user if it has filled up its partition while creating a snapshot, because it will prevent future snapshots to be made
Nuts2u
Level 3
Level 3
Posts: 129
Joined: Sun Nov 27, 2011 8:44 pm

Re: Timeshift and mount points

Post by Nuts2u »

Below is a shot of my timeshift storage on my @home btrfs system. I have it setup using the schedule system as follows: 5 daily, 3 weekly, 2 monthly. As you can see timeshift using the btrfs snapshot is very very space efficent, and I have full access to all the data. BTRFS snapshots are the only way to use timeshift to it's fullest use in my opinion.

There is some work involved converting from ext to btrfs but it is well worth the time and effort...just my opinion. I converted to btrfs about 6 months ago and I would never, never go back to ext 4. Btrfs snapshots are the future....They are not to be used in place of backups...no way. I do a full disk image back up every Sat using Clonezilla. But the esae of reverting to a prior btrfs snapshot using timeshift, (in case you update a system file and it breaks) happens in a instant. You reboot and there is your restored system. I also allow timershift to take snapshots of my @home btrfs volume also, so the totals displayed are also my @home volume.

screen02.jpg
Silence is golden. Duct tape is silver. Welcome to Hell. Here's your copy of Windows.
Nuts2u
Level 3
Level 3
Posts: 129
Joined: Sun Nov 27, 2011 8:44 pm

Re: Timeshift and mount points

Post by Nuts2u »

Foirgot to add in the above posting...When converting to btrfs you must have two btrfs sub-volumes one is @ which is mounted as / and the other is @home which is mounted as /home. These are not separate partitions......You have one btrfs partition....these are sub-volumes within the btrfs formated partition. When you setup timeshift it will see both sub-volumes and you can then include your @home sub volume in the snapshot. Really helpful if you delete one or more files in your home, then later realize your mistake and want to get those files back without doing a restore from your last backup. Open timeshift, browser to the day before snapshot, open the @home folder, browse to the location where your deleted file or files reside, highlight them, and copy them to your existing location, deleted file restored, problem solved.
Silence is golden. Duct tape is silver. Welcome to Hell. Here's your copy of Windows.
SuperBoby

Re: Timeshift and mount points

Post by SuperBoby »

This is very interesting. I'll test it on another computer that I plan to switch to LMDE. Thanks !

On the other hand, I don't see anyone in this thread agreeing on this warning that I'm suggesting to be added. Is there a reason for this ? Am I missing a best practice or something ?...
Locked

Return to “Software & Applications”