vorta icon indicating copy to clipboard operation
vorta copied to clipboard

Option to postpone backup if system is running low on battery

Open real-yfprojects opened this issue 2 years ago • 7 comments

Discussed in https://github.com/borgbase/vorta/discussions/990

Originally posted by jose1711 May 21, 2021 Maybe add an option to skip/postpone backup if system is running on battery (and battery level is under certain threshold)? Backup means IO and you may simply want to work longer than have a most-recent backup.

Originally posted by jose1711 May 21, 2021 psutil looks to be quite neat (https://psutil.readthedocs.io/en/latest/#psutil.sensors_battery) and seems to work fine on my laptop. Maybe this could be a new optional dependency. If the module is not present - the checkbox to toggle the option would be disabled.

real-yfprojects avatar Jan 04 '23 07:01 real-yfprojects

#1453

real-yfprojects avatar Jan 04 '23 07:01 real-yfprojects

Any update on this? I believe #1453 has been solved.

PhotonQuantum avatar May 29 '23 05:05 PhotonQuantum

I think this would be a nice-to-have feature for Vorta but somebody has do spend the time implementing it. Everyone would be very welcome to do so.

real-yfprojects avatar May 29 '23 07:05 real-yfprojects

Yeah, and it needs 2 implementations for Linux and macOS. Similar to e.g. autostart. I'll put "Help wanted" but not assign a milestone for now.

m3nu avatar May 29 '23 10:05 m3nu

Yeah, and it needs 2 implementations for Linux and macOS. Similar to e.g. autostart. I'll put "Help wanted" but not assign a milestone for now.

@m3nu Is this really still the case? Psutil 5.4.2 added macOS support, so Linux, Windows, FreeBSD, and macOS are supported; this makes it look like @real-yfprojects's recommendation is the right way forward. Or do you mean that you want an event-driven rather than polling interface? Yes, I agree, that will require different implementations for each. Mostly likely uPower for Linux (use DBUS directly, or use the upower wrapper), and whatever the macOS equivalent is--assuming a Python interface exists.

sten0 avatar Jul 22 '23 05:07 sten0

Good news. Then it's just a matter of pulling in a new (optional) dependency.

m3nu avatar Jul 22 '23 06:07 m3nu

Just to add a detail to this request, I think it would be useful to be able to indicate that a profile should simply not run if the system is running on battery similarly to the way SSID exclusion functions.

jonathanjsimon avatar Oct 03 '25 19:10 jonathanjsimon