Slowness due to lack of cache?

Hi all,

I have restic 0.15.1 backing up to an AWS S3 bucket. That part works great. What I then try to do is attempt a restore. The first thing I do is check the restore size before I waste time restoring to a volume that can’t fit the restore. Sadly, it took me more than four hours only for that.

$ export RESTIC_REPOSITORY="s3:s3.amazonaws.com/foo/backups/gitlab"
$ export AWS_ACCESS_KEY_ID=ABCD
$ export AWS_SECRET_ACCESS_KEY=1234
$ export RESTIC_PASSWORD="XXXXX"
$ alias restic="restic --no-cache"

$ time restic stats 3e09b991
repository fbc2cbd6 opened (version 2, compression level auto)
scanning...
Stats in restore-size mode:
     Snapshots processed:  1
        Total File Count:  210397
              Total Size:  46.788 GiB

real	250m49.565s
user	3m26.763s
sys	1m8.307s

As the backup is done on Kubernetes and the cache is on an EFS (NFS) volume, I have no access to it when I restore to my laptop, unless of course I copy the cache locally.

Is it expected to take this long without cache? The total repo is about 3TB. Would cache have made it any quicker? It all feels extremely slow.

Any advice would be welcome.

Hi,

I answered my own question. I downloaded the cache locally and did the following with far far better results :smiley:

$ alias restic="restic --cache-dir /tmp/cache"
$ time restic stats 3e09b991
repository fbc2cbd6 opened (version 2, compression level auto)
scanning...
Stats in restore-size mode:
     Snapshots processed:  1
        Total File Count:  210397
              Total Size:  46.788 GiB

real	0m17.867s
user	0m45.800s
sys	0m4.385s

Staggering difference but the problem is solved.

3 Likes