Hello,
I’m running restic 0.14 on a raspberry pi backing up 25MB in 3400 files. The filesystem is tmpfs without swapping, so everything is in RAM.
I’m seeing a strange behavior and I’m not sure if this is expected.
- when i run a backup job with
--no-cache
(even multiple repeat runs), restic appears to scan every single file and takes ~ > 20 seconds - when i run a backup job without
no-cache
, even though I just cleared the cache and restic has to rebuild it from scratch (as confirmed bycreated new cache in /run/restic
), it is very fast and finishes in 2 seconds
Why is restic less performant with --no-cache
even compared to an empty cache it has yet to rebuild?
Is it doing something dangerous in the empty cache situation?
Or is --no-cache
just unnecessarily complex/slow for the lack of optimization?
Otherwise, caching into another tmpfs like /run/ and deleting the files afterwards would improve the situation without affecting ram or sd card after the backup job is done:
restic --cache-dir /run/restic/ backup /data/
rm -rf /run/restic/
Here’s the full output:
root@hauspi:~# restic version
restic 0.14.0 compiled with go1.19 on linux/arm
root@hauspi:~#
root@hauspi:~# restic --no-cache backup /pisrv/
repository cf8c7b03 opened (repository version 2) successfully, password is correct
using parent snapshot ac3805f7
Files: 0 new, 0 changed, 3415 unmodified
Dirs: 0 new, 0 changed, 399 unmodified
Added to the repository: 0 B (0 B stored)
processed 3415 files, 23.018 MiB in 0:25
snapshot 444d0a19 saved
root@hauspi:~#
root@hauspi:~# restic --no-cache backup /pisrv/
repository cf8c7b03 opened (repository version 2) successfully, password is correct
using parent snapshot 444d0a19
Files: 0 new, 0 changed, 3415 unmodified
Dirs: 0 new, 0 changed, 399 unmodified
Added to the repository: 0 B (0 B stored)
processed 3415 files, 23.018 MiB in 0:24
snapshot 9ac2d786 saved
root@hauspi:~#
root@hauspi:~# restic --no-cache backup /pisrv/
repository cf8c7b03 opened (repository version 2) successfully, password is correct
using parent snapshot 9ac2d786
Files: 0 new, 0 changed, 3415 unmodified
Dirs: 0 new, 0 changed, 399 unmodified
Added to the repository: 0 B (0 B stored)
processed 3415 files, 23.018 MiB in 0:25
snapshot bffe59af saved
root@hauspi:~#
root@hauspi:~#
root@hauspi:~# restic backup /pisrv/
repository cf8c7b03 opened (repository version 2) successfully, password is correct
created new cache in /run/restic
using parent snapshot bffe59af
Files: 0 new, 0 changed, 3415 unmodified
Dirs: 0 new, 0 changed, 399 unmodified
Added to the repository: 0 B (0 B stored)
processed 3415 files, 23.018 MiB in 0:02
snapshot 0103e5cb saved
root@hauspi:~#
root@hauspi:~# rm -rf /run/restic
root@hauspi:~#
root@hauspi:~# restic backup /pisrv/
repository cf8c7b03 opened (repository version 2) successfully, password is correct
created new cache in /run/restic
using parent snapshot 0103e5cb
Files: 0 new, 0 changed, 3415 unmodified
Dirs: 0 new, 0 changed, 399 unmodified
Added to the repository: 0 B (0 B stored)
processed 3415 files, 23.018 MiB in 0:02
snapshot 44546f34 saved
root@hauspi:~#
root@hauspi:~# rm -rf /run/restic
root@hauspi:~#
root@hauspi:~# restic backup /pisrv/
repository cf8c7b03 opened (repository version 2) successfully, password is correct
created new cache in /run/restic
using parent snapshot 44546f34
Files: 0 new, 0 changed, 3415 unmodified
Dirs: 0 new, 0 changed, 399 unmodified
Added to the repository: 0 B (0 B stored)
processed 3415 files, 23.018 MiB in 0:02
snapshot a9a0ca02 saved
root@hauspi:~#
root@hauspi:~#