I use DejaDup app on my notebook and it works really nicely. But if the backup started when my notebook was not connected to power it cost more than 50% of my battery (I backup a whole home folder). Is there any way to set DejaDup to autorun only if a notebook is connected to power?
Hello! Thank you for the suggestion. What OS / desktop environment are you using?
I do want Deja Dup to be smart in this situation! It does try to pay attention to battery life in the form of your desktop’s “power saver” mode feature, which can be automatically enabled when power is low in GNOME Settings → Power (or somewhere else depending on your desktop environment). It can also be manually enabled.
When entering Power Saver mode, we pause any existing automatic backup and don’t start new ones. If it’s been over a day that we’ve delayed an automatic backup, we notify the user to let them know.
Reasons we do this rather than avoiding running on battery at all:
- Flatpak doesn’t normally have access to direct battery information, so it’s hard to only rely on that. But it does have access to the current power profile.
- It’s complicated to “do the right thing” all the time - if you disconnect temporarily because you’re moving from one room to another, you don’t necessarily want to stop your automatic backup. So you probably want to start paying attention to how much battery is left / how long you’ve been on battery mode. And that starts just being a re-implementation of power profiles.
Does that seem reasonable? Do you wish it also payed attention to battery mode?
Wow, thank you for the long and exciting answer. I use Kubuntu 23.10 with default power profiles. And it is a maybe mainly trouble because Deja Dup is mainly produced for Gnome. Unfortunately, the official backend system that I have in KDE does not support SMB, and Deja Dup works perfectly with this network backup. That is the reason why I use your application. Sometimes it is not perfect, but still, your application is number one for me.
The service that manages these profiles (power-profiles-daemon) is supposed to be desktop agnostic under freedesktop’s banner. But it’s pretty new and who knows how things will shake out.