Option to auto-adjust Network Bandwith limits #372
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
Hi,
We are using Borg to Backup linux laptops on our labs, and it works well !
Now a lot of our users work mainly from home, and some do not have a good connection for backup. In my case for instance I got only 80ko/s in upload (french ADSL). Without limit, the uplink is quickly saturated, and the connexion became totally unresponsive.
So our backup script evaluate the bandwith with iperf, and then set --remote-rate-limit as a third of the max bandwith. Still, if the bandwith is to small (less than 60ko/s in our case) the backup do not start, because it will never finish.
When a laptop is at home, the backup is slow, but well the connexion is still usable for other stuff.
When the laptop it at the workplace, it use the 1GB/s connexion, which is much better.
Could it be possible to implement such an « auto rating limit » in borgmatic ?
It is the only thing left preventing us to use borgmatic :-)
Kind regards,
Adrien
Environment
borgmatic version: 1.2.11 (from Debian Buster)
borgmatic installation method: Debian package
Borg version: 1.1.9
operating system and version: Debian Buster
Super interesting idea. Thanks for suggesting it. Would you be able to share your existing auto-rate-limiting script? That may help in making a borgmatic-native implementation.
What happens (or should happen) if the available bandwidth changes during the borgmatic backup?
Also note that the Borg FAQ has an entry for (non-auto) bandwidth rate limiting: https://borgbackup.readthedocs.io/en/stable/faq.html#is-there-a-way-to-limit-bandwidth-with-project-name
Yes, sure. Be careful, ours scripts are a bit quick and dirty ;) The principle is simple, we just launch the command
then parse it to have the last field (max bandwith) in ko/s. At last we set up borg to use only the third of it.
The rest is small adjustment for our needs: do not limit backup on servers, do not backup if the bandwith is too small (it will take too long).
Here is the part of our bash script:
I tried to adapt it in python, in order to use borgmatic. Here is the cron script, which calculate the bandwith, change /etc/borgmatic/config.yaml then launch borgmatic:
On the borg server, you should have iperf listening. I could be a security concern if not on a controlled network. Here is our systemd service :
Our system is quite naive, it may be improved on several points : use iperf3 instead of iperf, and as you mention it, it does not adapt in realtime during the backup (we assume the backup should be quick, so the bandwith do not change a lot)
Kind regards
Adrien
Unfortunately this still remains unimplemented after so many years! So just checking in.. Is it still a needed/desired feature? Thanks!