[SOLVED] Timeshift and changing disk mount space

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
Suwakoto
Level 2
Level 2
Posts: 55
Joined: Wed Jun 09, 2021 2:07 pm

[SOLVED] Timeshift and changing disk mount space

Post by Suwakoto »

Hello there.

I have two disks in my machine, one SSD and one HDD. The SSD is where the system lies, and HDD is used for data storage. I have set up Timeshift to make five daily backups, and to save them on the HDD, to save precious solid state space.

However, this has the unintended side-effect of every so often (probably when the backups are made) unmounting the disk from /media/[username]/[partition_name] to /run/timeshift/backup. It becomes unavailable in the file explorer, and I have to open the Disks utilit, unmount and remount it in order to access the files on it again.

Is there any way to stop Timeshift from doing that? Or if there isn't, is there at least a way to automatically (for example through a script) remount it after the backup is done?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
linux_trojan
Level 3
Level 3
Posts: 120
Joined: Fri Apr 12, 2013 4:43 pm

Re: Timeshift and changing disk mount space

Post by linux_trojan »

I have this trouble too sometimes. The problem was mounting disks as root, then using the browser as user. I started mounting disks as user. Have your checked your permissions? By the way, I dont use timeshift.
motoryzen
Level 10
Level 10
Posts: 3497
Joined: Sun Dec 08, 2019 12:25 am

Re: Timeshift and changing disk mount space

Post by motoryzen »

Suwakoto wrote: Sun Jun 20, 2021 9:49 am Hello there.

I have two disks in my machine, one SSD and one HDD. The SSD is where the system lies, and HDD is used for data storage. I have set up Timeshift to make five daily backups, and to save them on the HDD, to save precious solid state space.

However, this has the unintended side-effect of every so often (probably when the backups are made) unmounting the disk from /media/[username]/[partition_name] to /run/timeshift/backup. It becomes unavailable in the file explorer, and I have to open the Disks utilit, unmount and remount it in order to access the files on it again.

Is there any way to stop Timeshift from doing that? Or if there isn't, is there at least a way to automatically (for example through a script) remount it after the backup is done?
I'm willing to bet that Linux_Trojan is correct. This is also why I immediately choose to not do automatic backups in timeshift and instead just doing them manually as I want full access to my backup drives at all time while I'm not manually doing a backup.
Mint 21.2 Cinnamon 5.8.4
asrock x570 taichi ...bios p5.00
ryzen 5900x
128GB Kingston Fury @ 3600mhz
Corsair mp600 pro xt NVME ssd 4TB
three 4TB ssds
dual 1TB ssds
Two 16TB Toshiba hdd's
24GB amd 7900xtx vid card
Viewsonic Elite UHD 32" 144hz monitor
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Timeshift and changing disk mount space

Post by sanmig »

It’s advisable to use a dedicate partition for Timeshift, have it not running automatically and never 5 times a day.
TS takes care of your system which usually does not change 5 times a day.
Do not use TS for your data (home), in case of a restore you'd set everything back at once.

Every time TS runs it will search and compare SSD and HDD (you can hear it rumble), often useless because of no big change in system files.

The second but most important point:
TS will fill up the (TS) partition with small increments until it’s completely unusable for TS -
But it will not warn you that it can’t backup any more!
In the contrary, you’ll hear the rumble and think all good, until realizing there were no backups made since months.

My advice: Use TS with care and manually before you are going to play / install / update.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Timeshift and changing disk mount space

Post by sanmig »

sanmig wrote: Sun Jun 20, 2021 1:43 pm It’s advisable to use a dedicate partition for Timeshift, have it not running automatically and never 5 times a day.
TS takes care of your system which usually does not change 5 times a day.
Do not use TS for your data (home), in case of a restore you'd set everything back at once.

Every time TS runs it will search and compare SSD and HDD (you can hear it rumble), often useless because of no big change in system files.

The second but most important point:
TS will fill up the (TS) partition with small increments until it’s completely unusable for TS -
But it will not warn you that it can’t backup any more!
On the contrary, you’ll hear the rumble and think all good, until realizing there were no backups made since months.

My advice: Use TS with care and manually before you are going to play / install / update.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Timeshift and changing disk mount space

Post by sanmig »

sorry, double posting!
User avatar
AndyMH
Level 21
Level 21
Posts: 13758
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Timeshift and changing disk mount space

Post by AndyMH »

However, this has the unintended side-effect of every so often (probably when the backups are made) unmounting the disk from /media/[username]/[partition_name] to /run/timeshift/backup. It becomes unavailable in the file explorer, and I have to open the Disks utilit, unmount and remount it in order to access the files on it again.
One of my niggles about timeshift, if the destination partition is already mounted, timeshift still insists on mounting it again at /run/timeshift. I suppose the argument is that if it used the existing mount point the user might unmount it during a backup. I'm happy to take that risk. Linux will let you mount a partition in different places in the filesystem simultaneously, you should still be able to use the existing mount point.

Sanmig has already pointed out your problem, I have timeshift setup to automatically take snapshots daily and that is too often.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Suwakoto
Level 2
Level 2
Posts: 55
Joined: Wed Jun 09, 2021 2:07 pm

Re: Timeshift and changing disk mount space

Post by Suwakoto »

linux_trojan wrote: Sun Jun 20, 2021 10:13 am I have this trouble too sometimes. The problem was mounting disks as root, then using the browser as user. I started mounting disks as user. Have your checked your permissions? By the way, I dont use timeshift.
I actually mount it as user, it doesn't ask for my password when I mount or unmount it (except for when it's mounted by Timeshift in /run/timeshift/backup).
AndyMH wrote: Sun Jun 20, 2021 3:07 pm One of my niggles about timeshift, if the destination partition is already mounted, timeshift still insists on mounting it again at /run/timeshift. I suppose the argument is that if it used the existing mount point the user might unmount it during a backup. I'm happy to take that risk. Linux will let you mount a partition in different places in the filesystem simultaneously, you should still be able to use the existing mount point.
Indeed, if Timeshift happens to be doing its thing when I'm actively using the HDD, it doesn't unmount it (I guess it gets mounted in two places at once?). It is only if I happen to not be using the disk for long periods of time that the issue occurs.
sanmig wrote: Sun Jun 20, 2021 1:43 pm It’s advisable to use a dedicate partition for Timeshift, have it not running automatically and never 5 times a day.
TS takes care of your system which usually does not change 5 times a day.
Do not use TS for your data (home), in case of a restore you'd set everything back at once.

Every time TS runs it will search and compare SSD and HDD (you can hear it rumble), often useless because of no big change in system files.

The second but most important point:
TS will fill up the (TS) partition with small increments until it’s completely unusable for TS -
But it will not warn you that it can’t backup any more!
In the contrary, you’ll hear the rumble and think all good, until realizing there were no backups made since months.

My advice: Use TS with care and manually before you are going to play / install / update.
My machine is quite noisy, so I can't say I've noticed hearing any "rumbling" as a result of backups being made. As in, I don't even know when they're being made :P

I was thinking of switching around the partitions to make one dedicated for Timeshift. That way, it could unmount that and I wouldn't care, as all my files would be on the other one. However, that'd require resizing the current partition (there's just one, taking up the entire disk), which Mint warned me extensively may lead to data loss last time I've done it, so I wouldn't be thrilled to do it again. Besides, your second point comes in here - I frankly don't know how much space to leave for it. I certainly don't want to give it too much (I'm running low on space, anyway), but give it too little and the issue you've mentioned may appear. If I have to monitor the state of the disk (and possibly resize it later on), the process isn't really a "set up and forget" kind of deal, at which point I may as well just do the backups manually.

Indeed, in hindsight 5 backups a day is overkill. I just picked that because that's what the default value is for daily updates. I guess I'll switch from that to doing a manual backup once a week or so. Also, my home folder is encrypted, so Timeshift can't back it up even if I wanted it to.



Thanks for the responses, everyone :)
User avatar
AndyMH
Level 21
Level 21
Posts: 13758
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Timeshift and changing disk mount space

Post by AndyMH »

Just reread your original post alongside timeshifts settings - you weren't doing 5 daily backups, you were backing up daily and keeping five daily backups = same as me. You can still run it automatically, just disable daily and enable weekly and choose how many you want to keep (default = 3).

If you want to go for a dedicated partition for timeshift (I don't bother, I have a dedicated internal/removable drive for all my backups, one large ext4 partition), then size around 60GB.

Resizing a partition should not lead to data loss, it's never happened to me, but always have a backup.
Also, my home folder is encrypted, so Timeshift can't back it up even if I wanted it to.
I hope you have a robust backup regime for home. Do not use timeshift for home, there are complementary alternatives, I use backintime.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Timeshift and changing disk mount space

Post by sanmig »

Suwakoto wrote: Sun Jun 20, 2021 4:15 pm However, that'd require resizing the current partition (there's just one, taking up the entire disk), which Mint warned me extensively may lead to data loss ...
Working on partitions is dangerous and may lead to data loss, always be prepared by backups of important stuff!

One partition only - and neither MBR nor GUID partition table (check using Disks):
No partitioning (e.g. adding a partition) is possible, restart from zero (-1) with that drive.
MBR or GUID drive: Resizing may lead to data loss but usually does not … However …

In any case, additionally to TS and data file backups, a full drive backup (e.g. using AndyMH’s foxclone) is the fastest way to recover from playing with drives and partitions.
(Disclaimer: I’m a N00b with painful experiences, others may chime in here)

My Mint system was 28GB, TS partition was 60 GB, stopped silently (!) after about 7 month using the TS default (system grew to 34GB in that time, now I’m at 60GB system). Retried and it happened again.

Encryption: I think when you log in it’s open, so TS (and other stuff) has access.
I’m very privacy sensitive but don’t encrypt, because I know:
When anything goes wrong, everything will be lost, likely including the backups.
YMMV.

In your first posting please add [SOLVED] in front of the topic if you consider it closed, so others can identify solved threads: viewtopic.php?f=90&t=267264

Edit: AndyMH was faster to reply ... :)
mikeflan
Level 17
Level 17
Posts: 7155
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Timeshift and changing disk mount space

Post by mikeflan »

Indeed, in hindsight 5 backups a day is overkill.
My guess is you are not doing 5 backups a day. You are doing one per day for 5 days in a row.
If you are doing 5 backups a day you have 'Hourly' checked:
ts.png
There is nothing wrong with keeping 5 daily backups at a time.
Suwakoto
Level 2
Level 2
Posts: 55
Joined: Wed Jun 09, 2021 2:07 pm

Re: Timeshift and changing disk mount space

Post by Suwakoto »

mikeflan wrote: Sun Jun 20, 2021 7:50 pm My guess is you are not doing 5 backups a day. You are doing one per day for 5 days in a row.
If you are doing 5 backups a day you have 'Hourly' checked
AndyMH wrote: Sun Jun 20, 2021 5:25 pm Just reread your original post alongside timeshifts settings - you weren't doing 5 daily backups, you were backing up daily and keeping five daily backups = same as me. You can still run it automatically, just disable daily and enable weekly and choose how many you want to keep (default = 3).
Well then... I guess I was confused by the terminology myself. Indeed, I had Daily enabled, with frequency set to 5. But if that means it only backs up once a day, then it means Timeshift is annoyingly unmounting my drive even when it isn't backing stuff up, because it does so a couple times a day.
sanmig wrote: Sun Jun 20, 2021 5:29 pm Encryption: I think when you log in it’s open, so TS (and other stuff) has access.
I’m very privacy sensitive but don’t encrypt, because I know:
When anything goes wrong, everything will be lost, likely including the backups.
YMMV.
AndyMH wrote: Sun Jun 20, 2021 5:25 pm I hope you have a robust backup regime for home. Do not use timeshift for home, there are complementary alternatives, I use backintime.
Timeshift lets me backup the folder as a whole, but if I select to only include hidden files, it throws an error because of the encryption. So I guess it doesn't quite have access through the encryption, since it can't differentiate hidden files from non-hidden.

My home folder is basically just temporary storage, anything I actually want to keep is stored on the HDD, and I make duplicates of those files to put on my laptop. Anything else, like configuration files, I don't really care about. I mean, I recently reinstalled my system (after a failed switch to Arch), and I was up and running everything like before in a matter of a few hours, despite not transferring anything over from the old home folder.
Locked

Return to “Software & Applications”