brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: restic snapshots --group-by sorts snapshots per host and path

Backup
~/tips/tip-restic-snapshots-group-by

restic snapshots --group-by host,paths

Show restic snapshots grouped by host, path or tag.

Once several machines back up into one restic repository, restic snapshots becomes a long, mixed list. I’d group it.

Use --group-by:

restic snapshots --group-by host,paths
restic snapshots --group-by tags --compact

Each group gets its own heading, for example one host and one backed-up path, with its snapshots underneath. You can group by host, paths and tags, alone or together. --compact trims the table to the short form, which keeps it readable in a narrow terminal.

A caveat: grouping is only a view. It does not change what forget keeps, and that command has its own --group-by with a default of host and paths. If you rename a host, its old snapshots end up in a separate group.

One more detail: --latest 1 combined with the grouping shows only the newest snapshot per group. That is a quick way to check that every machine has made a backup recently, without scrolling through the history.

Further reading: restic docs, working with repositories

More Backup tips mysqldump --routines --events mydb > mydb.sql rsync -a --files-from=list.txt /home/me/ backup:/backup/ restic find "*.txt" restic stats tmutil verifychecksums /path/to/backup-item All Backup tips (45) All topics

Link