backrest
backrest copied to clipboard
Set nice/ionice levels for commands run by backrest
Is your feature request related to a problem? Please describe. Longer backup operations can noticeably impact system performance, especially on desktop systems.
Once restic check
will be supported, something like restic check --read-data
can also hog system resources for quite a while.
Describe the solution you'd like The rough idea is inspired by the restic documentation.
One example they use there is $ ionice -c2 nice -n19 ./restic -r /media/gour/backup/ backup /home
.
I have not completely thought this through, so this is just an idea that can probably be improved.
In the spirit of keeping things simple, I was thinking about implementing a switch somewhere (plan, repository) which would work as "run with normal process priority" or "run in background", where background would mean ionice -c2 nice -n19
.
I'm unsure whether running in background would be a good idea under all circumstances because if the machine is currently running other tasks (e.g. encoding a video), could the backrest task essentially take a lot longer and then block other backup operations? How would this new feature need to be implemented to not cause additional problems?
Would it be better to have ionice
and nice
be configurable by the user?