Yes because as a minimum all metadata will will compressed. How much smaller depends on your data. And given how old version of restic you are using huge amount of fixes and improvements has been implemented in the meantime.
Re prune - first it is much faster in newer restic as @alexweiss mentioned. Second more often you run it less job it has to do. The worst thing to do is to run it very rarely - then it is slow.
Okay, thank you everyone, i will try to simulate and implement new Restic in our system.
I remember last time i did, i can’t restore backup because of different version of Restic. Basically like Restic can’t restore because snapshot created by different version with current active Restic. but let me check again soon to make it sure.
It can only happen when you migrate to V2 repo and then try to use old restic to restore. It is one way road:) You move to the new one and should forget about using old one.
restic version
restic 0.15.2 compiled with go1.20.3 on linux/amd64
after 7 days, i checked again.
restic stats --mode raw-data
repository 010e7818 opened (version 1)
scanning...
Stats in raw-data mode:
Snapshots processed: 192
Total Blob Count: 626434
Total Size: 43.852 GiB
restic cache
Repo ID Last Used Old Size
----------------------------------------
010e78184b 0 days ago 20.040 GiB
----------------------------------------
1 cache dirs in /root/.cache/restic
so it still 50% of backup size, i tried to prune.
restic prune
repository 010e7818 opened (version 1)
loading indexes...
loading all snapshots...
finding data that is still in use for 192 snapshots
[19:05] 100.00% 192 / 192 snapshots
searching used packs...
collecting packs for deletion and repacking
[0:02] 100.00% 6892 / 6892 packs processed
to repack: 16414 blobs / 1.938 GiB
this removes: 198 blobs / 1.624 GiB
to delete: 335 blobs / 1.643 GiB
total prune: 533 blobs / 3.267 GiB
remaining: 626981 blobs / 43.936 GiB
unused size after prune: 86.202 MiB (0.19% of remaining size)
repacking packs
[0:22] 100.00% 72 / 72 packs repacked
rebuilding index
[0:02] 100.00% 6800 / 6800 packs processed
deleting obsolete index files
[0:00] 100.00% 19 / 19 files deleted
removing 96 old packs
[0:03] 100.00% 96 / 96 files deleted
done
and restic cache down to 17GB.
restic cache
Repo ID Last Used Old Size
----------------------------------------
010e78184b 0 days ago 16.844 GiB
----------------------------------------
1 cache dirs in /root/.cache/restic
du -sch /root/.cache/restic
17G /root/.cache/restic
17G total
I still considering this as too big, but really not sure what should i do next.
your cache is almost 40% size of the repo size which indeed is real big. To double check that it is correct I would just delete all cache (it is 100% safe) and see if during subsequent backups/prune it returns to this value.
There are many people requesting cache limit option to be added:
Yeah, that what i do, deleting cache folder regularly, because in 2-3 days it will be back at 16GB and start growing few mb each day (i did create backup 2 snapshots daily, and delete all snapshot older than 30 days).
I even thinking to put in cron to delete cache regularly
btw, if I put --no-cache in all my Restic command, will it mean cache directory (/root/.cache/restic) won’t created at all? i know it will has drawback, but in my case, it will save some storage for it.
Yea, I just realized it too now, but it’s actually backup of website file, database and webserver configuration. So when doing backup, it will create 3 snapshot at once.
BTW - data you backup - is it changing a lot? I am trying to understand why such large cache.
website file might not really changing a lot, but database that might changing frequently.
What is the output of find path/to/repository -size +30M? Is there maybe a folder in the backup which contains tens of thousands of files (directly inside the same folder)?
You could upgrade the repository to format version 2, which supports compression. That typically reduces the metadata size be a factor 3 or more. (I know that this is not a real solution.)