Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

Timeshift should unmount target device after having finished snapshot #653

Closed
oldtomdevel opened this issue Oct 5, 2020 · 7 comments
Closed

Comments

@oldtomdevel
Copy link

Issue refers to Timeshift v20.03 in Linux Mint 20 Cinnamon 64bit

Timeshift mounts the target device for the snapshots at the mounting point /run/timeshift/backup.
Unfortunately, the target device is not unmounted after having finished the snapshot or after the GUI is closed.
The mounting stays active till shutdown.
But this causes an annoying effect, as described below, if the target device is also used for user data.

My configuration is as follows:

  • standard Mint installation on a small SSD
  • another big SSD as my personal drive which is permanently mounted by fstab at some mounting point and used for my personal data (that data is referenced by some softlinks in my /home folder)
  • Timeshift is activated and saves its snapshots on the big SSD i.e. the one which is also permanently mounted as personal data storage.

The usage of one device as target device for Timeshift's snapshots and as storage for user data as well, is an allowed configuration.

When Timeshift was running i.e. when the target device has been mounted by Timeshift, any file on the big SSD can be achieved by two different paths, namely as /run/timeshift/backup/[subpath to file] and as [permanent mounting point]/[subpath to file]. If you now delete such a file i.e. move it to trash, it appears twice in the trash, namely with both paths. From a user's point of view this is not the expected behaviour. Any file deleted by the user should should appear only once. The double entry is caused by the additional mounting executed by Timeshift.

Therefore, Timeshift should unmount the target device when the mounting is not needed any more.

@Golddouble
Copy link

I also would suggest to unmount the target device when timeshift is closed because of this:
#675

@Natetronn
Copy link

Natetronn commented Dec 27, 2020

Timeshift v20.11.1
Manjaro KDE 20.2

I'm running into this as well and see two mount points in /etc/mtab for the same drive /dev/sdd1

/dev/sdd1 /wdusb ext4 rw,relatime,discard 0 0
/dev/sdd1 /run/timeshift/backup ext4 rw,relatime,discard 0 0

Note: /dev/sdd1 (Snapshot Location) is an External USB (/dev/sdb is the source to copy from)

One I manually added and the other is being added (but not removed) by Timeshift and it's leaving me with an incorrect path on that drive.

In /etc/fstab I added the following, in order to automatically boot the drive with the mount point /wdusb:

UUID=xxxxxxx-xxxx-xxxxx-xxxx-xxxxxxxxxxxxxxxx /wdusb ext4 defaults,nofail,discard 0 2

Using Dolphin File Manager, the path is /run/timeshift/backup/instead of /wbusb.

Possible duplicate: #578 (comment)

Is @oldtomdevel and @Golddouble's suggestion feasible?

mount-issue

@GregTheHun
Copy link

I'm also seeing this same issue in Manjaro xfce.

The way I have my settings in Timeshift right now:

Screenshot_2021-02-24_12-31-15
Screenshot_2021-02-24_12-31-41
Screenshot_2021-02-24_12-32-06
Screenshot_2021-02-24_12-32-26

@moonraker2
Copy link

Same issue in Xubuntu 20 (Timeshift not unmounting backup disk from /run/timeshift/ after backup has completed):

image

@ghost
Copy link

ghost commented Aug 22, 2021

Same issue here with DEBIAN Bullseye and timeshift 20.11.1-1

Bildschirmfoto_2021-08-22_11-28-52

@Windows-Is-Cancer
Copy link

Timeshift 20.03 on UBUNTU 20.04 mounts already mounted backup partition TWICE (dangerous!) AND does not unmount it after timeshift ended.

i have multiple physical internal drives that are all mounted on boot by /etc/fstab ( or gnome disks) using partition labels. One "backup" drive is mounted to /backups/ . TS ignores the fact and just mounts that partition again under /run/... .

THIS IS REAL BAD!! This might crash the filesystem since its unlikely a "cluster filesystem" that is ready for concurrent mounts.

Timeshift should check for mounted partitions and reuse those (keeping them mounted) or it should support "plain target directories" (like /backups/) so that no mount/unmount is nessesary at all.

OR in case timeshift is supposed to have its own exclusive (unmounted) partition to backup to, it should be mentioned in the system requirements, since this is IMPORTANT to prevent data loss.

@odonnellmj
Copy link

odonnellmj commented Oct 30, 2021

I am having the same problem on a brand new install of Ubuntu 21.10. I have large USB attached external disks which I use for several backups, one with Timeshare and others with my own rsync scripts. I like to automount on /media/<username>/<UUID>. Timeshare does its own second mount.

Besides the problems described above, I worried that TImeshift might try to mount other USB devices. I found that TImeshift has recorded the UUID of the external disk, so this is probably not an issue, but I haven't got the alternate disk to test it with. It has inhibited me from setting a scheduled backup lest it end up in the wrong place. The mount point selector appeared to care only about /dev/sda1 as the device, and not the UUID of the disk itself. I also wonder what will happen if the desired disk is mounted after another USB device, and ends up as /dev/sdb1.

teejee2008 added a commit that referenced this issue May 28, 2022
… Timeshift before exit

Any devices that Timeshift needs to mount will be mounted under /run/timeshift/<pid> and unmounted on application exit
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants