Minor quibble with --group-by

So you have the --host, --path, and --tag flags. But for some reason, under --group-by the options are host, pathS, and tagS

Is there any reason why the options under --group-by are plural (except for host!), where everywhere else they are not?

I keep doing restic tags and restic --group-by tag because I can’t remember when they’re plural and when they’re not. I’ve also had entirely too much caffeine today, but that’s a whole other problem. :innocent:

Can we just keep everything singular under --group-by? Pretty please? :blush:

EDIT: I am running v0.9.5-31-g3ca42405 in case that matters. It works better with my excludes file under Windows.

When grouping snapshots, the decision is made based on the hostname, the list of tags and the list of paths. At least for the paths it’s common that indeed the list contains more than one. On the other hand, there’s always exactly one host name for each snapshot. So at the time I wrote the code to do that, I though it was the natural way to name things. :slight_smile:

We can’t break restic by disallowing the plural form, but I think it’d be great for usability if restic just accepts the singular forms as well. Would that work?


Makes perfect sense to me. Appreciate it! :smile:

Do you maybe want to give this a try and add the code? Otherwise, can you please create an issue on GitHub so we can track it? Thanks! :slight_smile:

Okay, full disclosure - I have only programmed in VB.NET and Java, and that was back in college, a little over ten years ago. I managed to fork the project and was going through the code, but I can’t figure out Go lol. I just wanted you to know I was at least interested in contributing and gave it a solid try haha

Anyway, I’ll make an issue on GitHub. If I ever have more time on my hands, and learn some Go (I’d really like to!) I’ll be back to do more than post scripts on the wiki and whine about plural forms of nouns :laughing:

EDIT: https://github.com/restic/restic/issues/2330