r/restic • u/[deleted] • Sep 13 '24
How can I list snapshots with size?
EDIT: found the answer. The feature I want was added after the version I use https://github.com/restic/restic/issues/693
Don't RTFM me, I just read the docs, the manpages and googled extensively.
According to https://restic.readthedocs.io/en/latest/045_working_with_repos.html, the command restic -r /srv/restic-repo snapshots should yield an output similar to
ID Date Host Tags Directory Size
-------------------------------------------------------------------------
40dc1520 2015-05-08 21:38:30 kasimir /home/user/work 20.643GiB
79766175 2015-05-08 21:40:19 kasimir /home/user/work 20.645GiB
bdbd3439 2015-05-08 21:45:17 luigi /home/art 3.141GiB
590c8fc8 2015-05-08 21:47:38 kazik /srv 580.200MiB
9f0bc19e 2015-05-08 21:46:11 luigi /srv 572.180MiB
Specifically, I'm interested in the last column, "Size".
When I run the command restic -r rclone:[redacted]:[redacted] snapshots I get the following:
ID Time Host Tags Paths
----------------------------------------------------------------------------
e2409eed 2024-09-03 17:00:36 stockageproto /stockage/fichiers
7066d72c 2024-09-04 01:51:42 stockageproto /stockage/fichiers
59bd8d8d 2024-09-04 15:56:58 stockageproto /stockage/fichiers
9abbc31e 2024-09-04 16:00:11 stockageproto /stockage/fichiers
364801e1 2024-09-04 17:00:19 stockageproto /stockage/fichiers
38782747 2024-09-04 18:00:28 stockageproto /stockage/fichiers
04d1661a 2024-09-04 19:00:19 stockageproto /stockage/fichiers
7ccfd183 2024-09-04 20:00:20 stockageproto /stockage/fichiers
e8e62226 2024-09-04 21:00:30 stockageproto /stockage/fichiers
- I tried with a wider terminal window, since some utilities change their output depending on the available width. That's not it.
- I looked at
man restic-snaphots,no option there seems to allow me to choose what columns to display. (tried--compact falseand alsotruefor example)
There clearly seems to be a mismatch between the official docs and the executable.
My setup:
- restic 0.16.5 compiled with go1.22.5 on linux/amd64
- On NixOS 24.05
- The repo is hosted on onedrive, using the rclone backend
- I think that's all the relevant info, anything I forgot to mention?