{"action":"created","issue":{"url":"https://api.github.com/repos/restic/restic/issues/2037","repository_url":"https://api.github.com/repos/restic/restic","labels_url":"https://api.github.com/repos/restic/restic/issues/2037/labels{/name}","comments_url":"https://api.github.com/repos/restic/restic/issues/2037/comments","events_url":"https://api.github.com/repos/restic/restic/issues/2037/events","html_url":"https://github.com/restic/restic/issues/2037","id":369227709,"node_id":"MDU6SXNzdWUzNjkyMjc3MDk=","number":2037,"title":"--group-by option for snapshots command","user":{"login":"danielb2","id":26678,"node_id":"MDQ6VXNlcjI2Njc4","avatar_url":"https://avatars0.githubusercontent.com/u/26678?v=4","gravatar_id":"","url":"https://api.github.com/users/danielb2","html_url":"https://github.com/danielb2","followers_url":"https://api.github.com/users/danielb2/followers","following_url":"https://api.github.com/users/danielb2/following{/other_user}","gists_url":"https://api.github.com/users/danielb2/gists{/gist_id}","starred_url":"https://api.github.com/users/danielb2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielb2/subscriptions","organizations_url":"https://api.github.com/users/danielb2/orgs","repos_url":"https://api.github.com/users/danielb2/repos","events_url":"https://api.github.com/users/danielb2/events{/privacy}","received_events_url":"https://api.github.com/users/danielb2/received_events","type":"User","site_admin":false},"labels":[{"id":623697741,"node_id":"MDU6TGFiZWw2MjM2OTc3NDE=","url":"https://api.github.com/repos/restic/restic/labels/feature%20request","name":"feature request","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-10-11T17:31:59Z","updated_at":"2018-11-01T17:35:16Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!--\r\n\r\nWelcome! - We kindly ask that you:\r\n\r\n  1. Fill out the issue template below - not doing so needs a good reason.\r\n  2. Use the forum if you have a question rather than a bug or feature request.\r\n\r\nThe forum is at: https://forum.restic.net\r\n\r\nThe forum is a better place for questions about restic or general suggestions\r\nand topics, e.g. usage or documentation questions! This issue tracker is mainly\r\nfor tracking bugs and feature requests directly relating to the development of\r\nthe software itself, rather than the project.\r\n\r\nThanks for understanding, and for contributing to the project!\r\n\r\n-->\r\n\r\n\r\nOutput of `restic version`\r\n--------------------------\r\n\r\nrestic compiled manually compiled with go1.10.3 on freebsd/amd64\r\n\r\nWhat should restic do differently? Which functionality do you think we should add?\r\n----------------------------------------------------------------------------------\r\n\r\n<!--\r\nPlease describe the feature you'd like us to add here.\r\n-->\r\n\r\n\r\nWhat are you trying to do?\r\n--------------------------\r\n\r\nit would be great to have the --group-by option available for the snapshots command as well as the forget command. It makes it much easier to see the sets of backups marked with tags.\r\n\r\n`restic snapshots -g tags`\r\n\r\nSimilar grouped output as you see when you run `restic forget -g tags ...`\r\n\r\n```\r\nsnapshots for (tags [monthly]):\r\n      ...\r\nsnapshots for (tags [daily]):\r\n      ...\r\n```\r\n\r\nRef: https://forum.restic.net/t/feature-group-by-option-for-snapshots-command/1070/4\r\n\r\nDid restic help you or made you happy in any way?\r\n-------------------------------------------------\r\n\r\nIt makes me happy every day to know my backups are safe and secured :)"},"comment":{"url":"https://api.github.com/repos/restic/restic/issues/comments/435121304","html_url":"https://github.com/restic/restic/issues/2037#issuecomment-435121304","issue_url":"https://api.github.com/repos/restic/restic/issues/2037","id":435121304,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTEyMTMwNA==","user":{"login":"ArcticXWolf","id":5812215,"node_id":"MDQ6VXNlcjU4MTIyMTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5812215?v=4","gravatar_id":"","url":"https://api.github.com/users/ArcticXWolf","html_url":"https://github.com/ArcticXWolf","followers_url":"https://api.github.com/users/ArcticXWolf/followers","following_url":"https://api.github.com/users/ArcticXWolf/following{/other_user}","gists_url":"https://api.github.com/users/ArcticXWolf/gists{/gist_id}","starred_url":"https://api.github.com/users/ArcticXWolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArcticXWolf/subscriptions","organizations_url":"https://api.github.com/users/ArcticXWolf/orgs","repos_url":"https://api.github.com/users/ArcticXWolf/repos","events_url":"https://api.github.com/users/ArcticXWolf/events{/privacy}","received_events_url":"https://api.github.com/users/ArcticXWolf/received_events","type":"User","site_admin":false},"created_at":"2018-11-01T17:35:16Z","updated_at":"2018-11-01T17:35:16Z","author_association":"NONE","body":"I just thought to keep the snapshot items the same as in the ungrouped version, so any parsers do not need to be changed. You are right in that it is redundant information, but if I remove these, you have quite a dynamic format, for example it can look like this (--group-by tags,paths):\r\n\r\n```\r\n[\r\n  {\r\n    \"tags\": [\"testtag1\"],\r\n    \"paths\":[\"/tmp/restic-test-backupfiles\"],\r\n    \"snapshots\": [\r\n      {   \r\n        \"time\":\"2018-11-01T14:19:23.362772595+01:00\",\r\n        \"tree\":\"91194b9da8bc25337a7af934446bc340843866b29c992e94f6ca526ca5250bc0\",\r\n        \"hostname\":\"Testhost\",\r\n        \"username\":\"testuser\",\r\n        \"uid\":1000,\r\n        \"gid\":1000,\r\n        \"id\":\"d31cec985b2aac2afe33988a646440d7a687919568e5a594c21ba7cddc1bc944\",\r\n        \"short_id\":\"d31cec98\"\r\n      }\r\n    ]\r\n  }\r\n] \r\n```\r\nHere we have the tags and the paths as grouping criteria and with your logic I need to remove them from the inner. \r\n\r\nI can implement it either way, but I think it is easier to parse if we just provide all information in the inner level."}}
{"actor":{"display_login":"ArcticXWolf"}}