Open dietmarw opened 1 year ago
Thank you for filing this bug report. Can you enclose the logs starting with the time of opening Vorta to reproducing this issue?
One thing which might be the reason is that the laptop is also connected to a wired network connection via docking station. So something with the check of the active network does not quite work as it should.
Vorta queries the PrimaryConnection
property of NetworkManager. Do you know which connection is identified as the primary one on you machine?
Also does the setting work when unplugging the wired network?
So here are three logs.
So it really looks like the whole wifi check is passed whenever one is connected to LAN. Which is unfortunate since this really is a nice feature to have.
One thing that came to my mind, would it not be better to check for the active connections rather than just the primary connection. So basically interpreting the ActiveConnections object rather than PrimaryConnection.
Would this be possible?
Quoting the source code:
# Only check the primary connection. VPN over WiFi will still show the WiFi as Primary Connection.
# We don't check all active connections, as NM won't disable WiFi when connecting a cable.
I suppose the person that wrote those lines thought of the following scenario. The user has a mobile hotspot they don't want to run backups over. So they disable the network inside Vorta. At home they plug the Computer into the router with a LAN-cable without disabling the mobile hotspot. The user now expects backups to be run over LAN instead of WIFI.
Thinking about that this reasoning doesn't make much sense though since Vorta doesn't know which connection the packages will be routed through. When running a backup in above scenario the packages might still be sent over the WIFI.
I would also argue that the presence of an active Wifi connection is more a confirmation of the location the user is currently in (like home, office, en route)* and hence allowing the backup to start based on that. If the operating system then decided to use the LAN-cable instead, this should not be a reason to not start the backup.
*) I'm well aware that this also has its flaws with for example the "eduroam" network.
Thinking more about, if mobile hotspots are an issue then those networks should be set to "metered" by the user which then could be queried by Vorta.
e.g.,
$ nmcli -t -f GENERAL.METERED dev show wlp0s20f3
GENERAL.METERED:yes
EDIT: Which I just noticed is already an option and which Vorta would not do anyway unless one specifically allows it. So The check should really be changed to active and not just primary connections.
Description
I've set up a backup job that should only run if the laptop is on a certain network. Now it seems that when I tick the box of which network is allowed this setting is simply ignored and the backup runs anyway.
One thing which might be the reason is that the laptop is also connected to a wired network connection via docking station. So something with the check of the active network does not quite work as it should.
Reproduction
OS
Linux Ubuntu Mate 22.04
Version of Vorta
0.8.12
What did you install Vorta with?
Distribution package
Version of Borg
1.2.4
Logs
No response