Don't run when off AC power

Bug #192560 reported by Adam Porter
10
Affects Status Importance Assigned to Milestone
backupninja
New
Undecided
Unassigned
backupninja (Debian)
Confirmed
Unknown
backupninja (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Binary package hint: backupninja

When using backupninja on a laptop, it would be nice to be able to choose to not run certain jobs when off AC power. I don't want to use my limited battery power running a backup, I'd rather wait until I plug the system in.

Revision history for this message
Adam Porter (alphapapa) wrote :

I have modified backupninja to check if a job is not supposed to be run on battery power, and if not, if the system is on battery power. It checks for a "runonbattery" option (which defaults to "yes") in the main section of each backup job's config file in /etc/backup.d, and uses "acpi -a" and grep to check the power status.

I'm not sure of the right way to supply a diff, so I will attach /usr/sbin/backupninja, changed from 0.9.4-6ubuntu4. Then the default config file should be updated, and ninjahelper too, I guess, though that's over my head right now.

Hopefully this can be merged into Ubuntu and Debian. I'd suggest upstream, but it hasn't even released 0.9.5 yet, though it's had several changes since 0.9.4.

Revision history for this message
Andrea Colangelo (warp10) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. To get your fix included in Ubuntu, it would help if you tried transforming it into a debdiff (http://wiki.ubuntu.com/PackagingGuide/Recipes/Debdiff) and submit it for review (http://wiki.ubuntu.com/SponsorshipProcess). If you prefer somebody else to do that, that's fine - please just indicate if you're available to do that.
Another good way to get this patch included in backupninja could be asking upstream and check that the software developer(s) like(s) your patch. This way, this will be integrated in Debian and then synced in Ubuntu.
Please, re-subscribe u-u-s once done.

Changed in backupninja:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
bruno (brunomacagnani) wrote :

I have the same problem with Ubuntu 9.04.
My notebook is an HP dv6000 series, the model is hp dc 6725us, and with Nvidia.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

We're sorry that we do not always have the time to look at patches. Thank you for your patch in fixing this issue. It would be great if you could forward this patch upstream and hear their thoughts on the patch. Also of note, it would be great if you could submit a diff since its easier to see what was changed between the versions.

tags: added: patch-forwarded-upstream
tags: added: patch-needswork
removed: patch-forwarded-upstream
Revision history for this message
Andreas Moog (ampelbein) wrote :

This has been reported to the developers of the software, you can make comments and track the status at https://labs.riseup.net/code/issues/2810

Changed in backupninja (Ubuntu):
status: Confirmed → Triaged
Changed in backupninja (Debian):
status: Unknown → New
Changed in backupninja (Debian):
status: New → Confirmed
Revision history for this message
Sergey Svishchev (svs) wrote :

From upstream bug tracker:

"Those interested in implementing this requested feature shall have a look to past discussion about it on Debian bug #466193: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466193.
An already working (quite elegant) workaround is also documented there."

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.