Resources limitation


#1

Hello everybody,
I discovered restic this morning and I am enthusiast about his product.
Is there any option to limit resources (bandwith, cpu, …) consumption?
For instance, bandwith limitation can be done with rsync, backuppc or bareos.
Thanks in advance.


#2

I don’t believe that restic can apply bandwidth limits, but you can accomplish this by using restic alongside of rclone, in particular the rclone serve restic command with the --bwlimit option. Restic then talks to rclone, and rclone talks to the backend, throttling as necessary.


#3

Thanks, it is a good solution.
And thanks for your reactivity, I’ll be able to resume my tests.


#4

What about the --limit-upload option? I use this and it seems to work.

–limit-upload int limits uploads to a maximum rate in KiB/s. (default: unlimited)


#5

D’oh, I don’t know how I missed that!


#6

Thanks, I am on debian 9 and I test the default version of restic, 0.3.3 and tha flad --limit-upload does not exist.


#7

On the documentation https://restic.readthedocs.io/en/stable/faq.html
I found How to prioritize restic’s IO and CPU time
ionice -c2 nice -n19 ./restic -r /media/gour/backup/ backup /home


#8

I download last version 0.9.4 and option --limit-upload works very well.
THANKS


#9

Yeah, don’t use the version in Debian. It’s too old to be useful.

ionice is typically redundant as the kernel will automatically raise or lower the I/O priority of a process proportional to its nice value. nice -n19 should be sufficient.


#10

Which restic version is Debian 10 (currently in freeze) going to provide? If it hasn’t upgraded to a current version, then I would build a current version from source and use that. I found the build process very easy and seamless. You have to install the Go compiler and that is available in apt, easy.


#11

According to p.d.o, Buster currently has 0.9.4.


#12
systemd-run --scope  -p CPUQuota=15%  -p IOWeight=10  -p IOReadBandwidthMax="/dev/sda 10M" restic