Restic 0.14 flags syntax

I am updating my wrapper (restaround) and wonder about some inconsistencies. About restic help:

restic mount has

  • –path which may be given only once, why not multiple times?
  • –path-template which may be given multiple times
  • –tag which is a list (comma separated, I suppose), may be given only once
  • –time-template, may be given only once

My questions:

  1. Why not allow all those flags multiple times?

  2. Some flags taking lists are allowed multiple times, some are not. What is the rationale? See also restic help tag

  3. –time-template: I would think that template means placeholders or wildcards are possible. Can you give an example how that would look like? OTOH if --time-template only allows specific times, why not call it --time? And - would --time-template 2006-01 mean all times from Jan 2006, or exactly Jan 2006, 00:00:00?

--path and --tag can be given multiple times, it’s just the help output that is inconsistent.

You’re completely misinterpreting --time-template. That parameter specifies how the timestamp of a snapshot should be converted to a directory name, just have a look at the snapshots/ folder.

Thank you for clarifying this!

PR Cleanup snapshot filter options by MichaelEischer · Pull Request #3912 · restic/restic · GitHub will clean up the options inconsistency a bit.