backintime icon indicating copy to clipboard operation
backintime copied to clipboard

snapshots may get written to empty mountpoint

Open mokafolio opened this issue 5 years ago • 11 comments

Hello,

I am experiencing some weirdness with my setup. I am backing up to an external hdd and it appears to work. The schedule is set to hourly and if the external hdd is connected everything works as expected and the snapshot list in back in time looks correct. If the hdd is not connected though, it shows another list of snapshots which I guess ran while the hdd was not connected. Why is that happening? I'd expect it to simply not take a snapshot if the external hdd is not connected. I am pretty sure its only diffing stuff without copying the backup anywhere in the latter case.

thank you!

EDIT: Related Debian Bug Ticket https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995257

mokafolio avatar Jul 13 '19 07:07 mokafolio

What do you see if you look in the mount point where the drive would be if it were connected?

colinl avatar Jul 13 '19 20:07 colinl

Ah, that exactly is the problem. If the external HDD is not connected, it just uses the folder of the mount point to store the backups. Is there any way to disable that behavior? I'd like it to only create backups if the HDD is connected. Thanks!

mokafolio avatar Jul 13 '19 23:07 mokafolio

How do you run BiT?

colinl avatar Jul 14 '19 06:07 colinl

I am using the qt client (v. 1.2.0) with basically the default settings.

mokafolio avatar Jul 14 '19 17:07 mokafolio

I believe there are hooks in BiT that let you run a script before a backup. You could check the drive is mounted in there. I haven't used the scripting but I assume it is documented somewhere. In the meantime if you empty the mount point folder (make sure the disc is not plugged in!) the it will be pretty obvious that something is wrong as there will be no snapshots shown.

colinl avatar Jul 14 '19 20:07 colinl

where would I find those hooks in the gui version?

mokafolio avatar Jul 15 '19 05:07 mokafolio

I don't know. Perhaps someone else can tell us how.

colinl avatar Jul 16 '19 07:07 colinl

So I worked around this. Instead of using the mount point directly as the backup location, I created a folder to use that only exists when the extern HDD is mounted. This should work. Would be cool to find another way though! Thank for all the input!

mokafolio avatar Jul 17 '19 07:07 mokafolio

@mokafolio There is a new forming maintaining team and we do review all issues. Is this problem still relevant for you, can you reproduce it with a newer or the latest release? Did you find a solution?

Tag: Bug, Feedback, Documentation

Here again we have the problem when the destination is a mount point instead of a folder under the mount point.

buhtz avatar Sep 26 '22 08:09 buhtz

Yes, I've described the same workaround here: https://github.com/bit-team/backintime/issues/1230#issuecomment-1198018112

This is definitely something we need to look into.

emtiu avatar Oct 08 '22 23:10 emtiu

For my info, how to check if mounted on shell:

$ findmnt --no-headings --options TARGET <path>

Or with Python itself:

>>> import psutil
>>> psutil.disk_partitions(all=True)

But the easiest might be this and checking return code:

$ mountpoint <path>

buhtz avatar Jul 30 '24 08:07 buhtz