Obtain details from cache Repo ID's

I have Restic being used for the majority of metadata for the dbsystems, all of the sources are backing up successfully after some effort. I had one that needed to have the database scrubbed of old snapshots that were from back before the database was rebuilt, they were causing the cache to compound in size. After getting that server back functional, I was alerted the “offsite” backup server where Restic is sending the repo data to as a secondary backup didn’t get the benefits of the cleaning.

How can I access this specific Repo ID on the offsite system to clean it up?

Len [OSRepo] # restic cache
Repo ID     Last Used   Old  Size
caf8ca7ca6  0 days ago       269.968 KiB
0c9d903e8c  0 days ago       263.959 KiB
6ec9983aea  0 days ago       264.530 KiB
15c18b1016  0 days ago       131.896 KiB
9da7b4fb6e  0 days ago       138.055 KiB
1953106a62  0 days ago       279.953 KiB
dc57a86272  0 days ago       268.975 KiB
396b03dbed  0 days ago       254.717 KiB
4c4cc7ce21  0 days ago       535.599 KiB
16ba542974  0 days ago        18.832 MiB
6851ef5deb  0 days ago       250.451 KiB
b3630b4dbe  0 days ago       265.129 KiB
d641ec3345  0 days ago       162.070 KiB
514fa485d9  0 days ago        54.006 KiB
**3509860a3a  0 days ago        21.243 GiB**
ae9a1b59a7  0 days ago       625.793 MiB
71aa9bd15f  0 days ago         1.157 GiB
509c94710d  0 days ago         1.738 MiB
0433dd9e41  0 days ago       376.644 KiB
2bb3db4d25  0 days ago       376.216 KiB
ff95bd7656  0 days ago       375.752 KiB
abd32a0ab0  0 days ago       360.607 KiB
a7e251a8c7  0 days ago       519.336 KiB
0c69699349  0 days ago       530.239 KiB
a22e581651  0 days ago        59.924 MiB
aedf63364b  0 days ago        12.252 MiB
d255e933e3  0 days ago       562.890 KiB
3b4e24c143  0 days ago       562.890 KiB
d1e37a3d2b  0 days ago       562.913 KiB
ad13742706  0 days ago       562.916 KiB
efe6318134  0 days ago       562.887 KiB
e152951c62  0 days ago       562.912 KiB
3d9311d7bd  0 days ago       568.859 KiB
92f878086f  0 days ago       562.896 KiB
5c6e720a54  0 days ago       628.905 KiB
9b6857cb2e  0 days ago       629.806 KiB
bc70ec6ca3  0 days ago       268.900 KiB
b5498b2459  0 days ago        19.690 MiB
3e5c6f7a87  0 days ago       567.386 KiB
4ea0f2d552  0 days ago       537.859 KiB
02aec48035  0 days ago       536.116 KiB
50679a3695  0 days ago       522.749 KiB
04a7fe0abf  0 days ago       648.980 KiB
f0686aaa80  0 days ago        22.872 MiB
af5baef1ab  0 days ago       650.298 KiB
2a89458926  0 days ago       371.500 KiB
db8a5519c2  0 days ago       225.930 MiB
47 cache dirs in /root/.cache/restic

The cache directories are stored in /root/.cache/restic. There’s a folder with a prefix 3509860a3a, that’s the one you’re looking for.

I understand the directory for the content is there. I don’t know how to specify the one cache which is 20+GB to clean out the old content. deleting the directory just results in it building back to 20+ GB over the span of the week.

I’m not sure I understand the setup. Which hosts access the repsitory in question and when/how do you run prune? The cache only keeps files that still exist in the repository.

I’m struggling with how to explain this better… I am trying to figure out what system this cache came from so i can resolve why it’s thinking there’s 20+ gigs worth backing up.

there are no source machines with matching cache size to this one and i can’t find a mirrored cache directory on any of the ones which would be depositing their restic cache here. is there a way to identify a source instance name or ip, or is there a way to specify this cache so i can look at what snaps are present?

This instance is intended to be an off-site backup so it’s getting content from many locations, I want to identify the contents within the cache to confirm before restoring the backups.

The source system should also have a folder in its restic cache with a prefix of 3509860a3a.

Alternatively you could run the following command for each restic repository to retrieve its id: restic cat config | jq .id.