Hello,
I am using restic
as part of ButterBackup, another backup solution. I have a quite heavy test suite, which takes ages to execute. I identified that one contribution to the test suites’ long execution time is that I run restic init
very often.
These are two test executions of restic init
:
$ time echo "1230X~98evahluiedfng" | restic init -r restic
reading repository password from stdin
created restic repository f8178a760e at restic
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
echo "1230X~98evahluiedfng" 0,00s user 0,00s system 54% cpu 0,001 total
restic init -r restic 2,69s user 0,03s system 99% cpu 2,738 total
$ rm -rf restic
/tmp time echo "1230X~98evahluiedfng" | restic init -r restic
reading repository password from stdin
created restic repository 2918ef27ee at restic
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
echo "1230X~98evahluiedfng" 0,00s user 0,00s system 45% cpu 0,001 total
restic init -r restic 2,17s user 0,04s system 98% cpu 2,241 total
As you can see, it takes more than 2 seconds to initialise a repository.
I’d like to know whether there is a way to speed this up. Since it affects the test suite only, I am willing to sacrifice security. For instance, I was able to reduce the cryptsetup luksFormat
time by lowering the PBKDF’s parameters to the lowest possible values (see here).
Is there something that can be done for Restic?