Snapshots display unusable with --files-from


#1

Because of the limited (i.e. absent) inclusion filters, I create a list of files with a combination of find and grep for restic to process. There are 17,516 files in my list.

I feed that list to restic and it processes things just fine:
restic -r sftp:host:/jffs/share/restic-temp backup --files-from /tmp/restic_backup_list

Then, when I show the snapshots, restic proceeds to list every single of my 17,516 files in the snapshots list, for each snapshot. Needless to say, this is not usable.

As a user, I guess I would expect restic to act the same way if I use exclude options or the --files-from option: the snapshot is anchored at some point (with the exclude case, it’s the point I specify on the command line; with the --files-from, it could be the highest directory in the list).

Is this intentional? Is there any way not to see 17,516 lines for every snapshot?

A couple of ways I can see to address this, from a user point of view:

  1. As mentioned above, have restic figure out the highest common directory in the list, and use that as the anchor point
  2. Let the user provide some reasonable label/directory to use as the anchor point

Thanks - Steven


#2

Use restic snapshots --compact and add tags for the snapshots, that’d be my suggestion for now.


#3

Thanks - that cleans up the display.

I think I’ve come up with another creative workaround.

  1. Make a list of all the files on my system starting at “/” (it’s a Raspberry Pi so it’s not too bad). Call this “list 1”
  2. Using a combination of find and grep create a list of files that I actually want to backup. Call this “list 2”
  3. do a difference between “list 1” and “list 2” - call this “list 3”

“list 3” becomes my --exclude-file argument.

Note that I clean up list 3 with some overall top-level global excludes (like excluding /tmp and other wholesale directories).

Works like a charm, and restic snapshots shows a single entry, which is the directory /

Regards - Steven