rugk / borg-cron-helper

Helper shell scripts for BorgBackup to automate backups and make your life easier… 😉
MIT License
81 stars 14 forks source link

Pause backup while being on metered connection #70

Open kinafu opened 5 years ago

kinafu commented 5 years ago

With Gnome NetworkManager one can set, wheter a connection is metered (other word for metered is "fee-based"). On a metered connection, smart programs will stop unimportant background activities such as system updates, backup jobs and so on.

It comes handy to set the property to yes in situations like a capped data plan or on a generally slow WiFi connection.

Borg-cron-helper should also respect the metered property and take a break.

rugk commented 5 years ago

Great idea! :smile:

I doubt we can really "break"/pause, so we should just exit – as we do when the device is running low on battery.

Relevant for implementation: https://stackoverflow.com/questions/43228973/detect-if-current-connection-is-metered-with-networkmanager https://bbs.archlinux.org/viewtopic.php?id=244084