Option to postpone backup if system is running low on battery
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.
#1453
Any update on this? I believe #1453 has been solved.
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.
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.
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.
Good news. Then it's just a matter of pulling in a new (optional) dependency.
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.