{"action":"created","comment":{"url":"https://api.github.com/repos/restic/restic/pulls/comments/349759173","pull_request_review_id":321762647,"id":349759173,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0OTc1OTE3Mw==","diff_hunk":"@@ -213,12 +213,66 @@ All snapshots are evaluated against all matching ``--keep-*`` counts. A\n single snapshot on 2017-09-30 (Sat) will count as a daily, weekly and monthly.\n \n Let's explain this with an example: Suppose you have only made a backup\n-on each Sunday for 12 weeks. Then ``forget --keep-daily 4`` will keep\n-the last four snapshots for the last four Sundays, but remove the rest.\n-Only counting the days which have a backup and ignore the ones without\n-is a safety feature: it prevents restic from removing many snapshots\n-when no new ones are created. If it was implemented otherwise, running\n-``forget --keep-daily 4`` on a Friday would remove all snapshots!\n+on each Sunday for 12 weeks:\n+\n+.. code-block:: console\n+\n+   $ restic snapshots\n+   repository f00c6e2a opened successfully, password is correct\n+   ID        Time                 Host        Tags        Paths\n+   ---------------------------------------------------------------\n+   0a1f9759  2019-09-01 11:00:00  mopped                  /tmp/foo\n+   46cfe4d5  2019-09-08 11:00:00  mopped                  /tmp/foo\n+   f6b1f037  2019-09-15 11:00:00  mopped                  /tmp/foo\n+   eb430a5d  2019-09-22 11:00:00  mopped                  /tmp/foo\n+   8cf1cb9a  2019-09-29 11:00:00  mopped                  /tmp/foo\n+   5d33b116  2019-10-06 11:00:00  mopped                  /tmp/foo\n+   b9553125  2019-10-13 11:00:00  mopped                  /tmp/foo\n+   e1a7b58b  2019-10-20 11:00:00  mopped                  /tmp/foo\n+   8f8018c0  2019-10-27 11:00:00  mopped                  /tmp/foo\n+   59403279  2019-11-03 11:00:00  mopped                  /tmp/foo\n+   dfee9fb4  2019-11-10 11:00:00  mopped                  /tmp/foo\n+   e1ae2f40  2019-11-17 11:00:00  mopped                  /tmp/foo\n+   ---------------------------------------------------------------\n+   12 snapshots\n+\n+Then ``forget --keep-daily 4`` will keep the last four snapshots for the last\n+four Sundays, but remove the rest:\n+\n+.. code-block:: console\n+\n+   $ restic forget --keep-daily 4 --dry-run\n+   repository f00c6e2a opened successfully, password is correct\n+   Applying Policy: keep the last 4 daily snapshots\n+   keep 4 snapshots:\n+   ID        Time                 Host        Tags        Reasons         Paths\n+   -------------------------------------------------------------------------------\n+   8f8018c0  2019-10-27 11:00:00  mopped                  daily snapshot  /tmp/foo\n+   59403279  2019-11-03 11:00:00  mopped                  daily snapshot  /tmp/foo\n+   dfee9fb4  2019-11-10 11:00:00  mopped                  daily snapshot  /tmp/foo\n+   e1ae2f40  2019-11-17 11:00:00  mopped                  daily snapshot  /tmp/foo\n+   -------------------------------------------------------------------------------\n+   4 snapshots\n+\n+   remove 8 snapshots:\n+   ID        Time                 Host        Tags        Paths\n+   ---------------------------------------------------------------\n+   0a1f9759  2019-09-01 11:00:00  mopped                  /tmp/foo\n+   46cfe4d5  2019-09-08 11:00:00  mopped                  /tmp/foo\n+   f6b1f037  2019-09-15 11:00:00  mopped                  /tmp/foo\n+   eb430a5d  2019-09-22 11:00:00  mopped                  /tmp/foo\n+   8cf1cb9a  2019-09-29 11:00:00  mopped                  /tmp/foo\n+   5d33b116  2019-10-06 11:00:00  mopped                  /tmp/foo\n+   b9553125  2019-10-13 11:00:00  mopped                  /tmp/foo\n+   e1a7b58b  2019-10-20 11:00:00  mopped                  /tmp/foo\n+   ---------------------------------------------------------------\n+   8 snapshots\n+\n+The result of the ``forget --keep-daily`` operation does not depend on when it\n+is run, it will only count the days for which a snasphot exists. This is a","path":"doc/060_forget.rst","position":66,"original_position":66,"commit_id":"5f22a2873b7a497dce5889b870217dcd43a426bd","original_commit_id":"5f22a2873b7a497dce5889b870217dcd43a426bd","user":{"login":"rawtaz","id":825204,"node_id":"MDQ6VXNlcjgyNTIwNA==","avatar_url":"https://avatars0.githubusercontent.com/u/825204?v=4","gravatar_id":"","url":"https://api.github.com/users/rawtaz","html_url":"https://github.com/rawtaz","followers_url":"https://api.github.com/users/rawtaz/followers","following_url":"https://api.github.com/users/rawtaz/following{/other_user}","gists_url":"https://api.github.com/users/rawtaz/gists{/gist_id}","starred_url":"https://api.github.com/users/rawtaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawtaz/subscriptions","organizations_url":"https://api.github.com/users/rawtaz/orgs","repos_url":"https://api.github.com/users/rawtaz/repos","events_url":"https://api.github.com/users/rawtaz/events{/privacy}","received_events_url":"https://api.github.com/users/rawtaz/received_events","type":"User","site_admin":false},"body":"s/snasphot/snapshot/","created_at":"2019-11-22T19:30:21Z","updated_at":"2019-11-22T19:30:22Z","html_url":"https://github.com/restic/restic/pull/2489#discussion_r349759173","pull_request_url":"https://api.github.com/repos/restic/restic/pulls/2489","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/restic/restic/pulls/comments/349759173"},"html":{"href":"https://github.com/restic/restic/pull/2489#discussion_r349759173"},"pull_request":{"href":"https://api.github.com/repos/restic/restic/pulls/2489"}}},"pull_request":{"url":"https://api.github.com/repos/restic/restic/pulls/2489","id":344661815,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ0NjYxODE1","html_url":"https://github.com/restic/restic/pull/2489","diff_url":"https://github.com/restic/restic/pull/2489.diff","patch_url":"https://github.com/restic/restic/pull/2489.patch","issue_url":"https://api.github.com/repos/restic/restic/issues/2489","number":2489,"state":"open","locked":false,"title":"Improve example for forget --keep-daily","user":{"login":"fd0","id":123276,"node_id":"MDQ6VXNlcjEyMzI3Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/123276?v=4","gravatar_id":"","url":"https://api.github.com/users/fd0","html_url":"https://github.com/fd0","followers_url":"https://api.github.com/users/fd0/followers","following_url":"https://api.github.com/users/fd0/following{/other_user}","gists_url":"https://api.github.com/users/fd0/gists{/gist_id}","starred_url":"https://api.github.com/users/fd0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fd0/subscriptions","organizations_url":"https://api.github.com/users/fd0/orgs","repos_url":"https://api.github.com/users/fd0/repos","events_url":"https://api.github.com/users/fd0/events{/privacy}","received_events_url":"https://api.github.com/users/fd0/received_events","type":"User","site_admin":false},"body":"<!--\nThank you very much for contributing code or documentation to restic! Please\nfill out the following questions to make it easier for us to review your\nchanges.\n\nYou do not need to check all the boxes below all at once, feel free to take\nyour time and add more commits. If you're done and ready for review, please\ncheck the last box.\n-->\n\nWhat is the purpose of this change? What does it change?\n--------------------------------------------------------\n\nBe a bit more verbose on the forget example, add restic's output.\n\n<!--\nDescribe the changes here, as detailed as needed.\n-->\n\nWas the change discussed in an issue or in the forum before?\n------------------------------------------------------------\n\nFollowing up on https://github.com/restic/restic/pull/2406\n\n\n\n\n\n<!--\nLink issues and relevant forum posts here.\n\nIf this PR resolves an issue on GitHub, use \"closes #1234\" so that the issue is\nclosed automatically when this PR is merged.\n-->\n\nChecklist\n---------\n\n- [x] I'm done, this Pull Request is ready for review","created_at":"2019-11-22T19:17:01Z","updated_at":"2019-11-22T19:30:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"148c8df6dc30cd5950fb9ce5f894120c3eef5e0e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/restic/restic/pulls/2489/commits","review_comments_url":"https://api.github.com/repos/restic/restic/pulls/2489/comments","review_comment_url":"https://api.github.com/repos/restic/restic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/restic/restic/issues/2489/comments","statuses_url":"https://api.github.com/repos/restic/restic/statuses/5f22a2873b7a497dce5889b870217dcd43a426bd","head":{"label":"restic:improve-forget-docs","ref":"improve-forget-docs","sha":"5f22a2873b7a497dce5889b870217dcd43a426bd","user":{"login":"restic","id":10073512,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMDczNTEy","avatar_url":"https://avatars3.githubusercontent.com/u/10073512?v=4","gravatar_id":"","url":"https://api.github.com/users/restic","html_url":"https://github.com/restic","followers_url":"https://api.github.com/users/restic/followers","following_url":"https://api.github.com/users/restic/following{/other_user}","gists_url":"https://api.github.com/users/restic/gists{/gist_id}","starred_url":"https://api.github.com/users/restic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/restic/subscriptions","organizations_url":"https://api.github.com/users/restic/orgs","repos_url":"https://api.github.com/users/restic/repos","events_url":"https://api.github.com/users/restic/events{/privacy}","received_events_url":"https://api.github.com/users/restic/received_events","type":"Organization","site_admin":false},"repo":{"id":19205896,"node_id":"MDEwOlJlcG9zaXRvcnkxOTIwNTg5Ng==","name":"restic","full_name":"restic/restic","private":false,"owner":{"login":"restic","id":10073512,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMDczNTEy","avatar_url":"https://avatars3.githubusercontent.com/u/10073512?v=4","gravatar_id":"","url":"https://api.github.com/users/restic","html_url":"https://github.com/restic","followers_url":"https://api.github.com/users/restic/followers","following_url":"https://api.github.com/users/restic/following{/other_user}","gists_url":"https://api.github.com/users/restic/gists{/gist_id}","starred_url":"https://api.github.com/users/restic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/restic/subscriptions","organizations_url":"https://api.github.com/users/restic/orgs","repos_url":"https://api.github.com/users/restic/repos","events_url":"https://api.github.com/users/restic/events{/privacy}","received_events_url":"https://api.github.com/users/restic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/restic/restic","description":"Fast, secure, efficient backup program","fork":false,"url":"https://api.github.com/repos/restic/restic","forks_url":"https://api.github.com/repos/restic/restic/forks","keys_url":"https://api.github.com/repos/restic/restic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/restic/restic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/restic/restic/teams","hooks_url":"https://api.github.com/repos/restic/restic/hooks","issue_events_url":"https://api.github.com/repos/restic/restic/issues/events{/number}","events_url":"https://api.github.com/repos/restic/restic/events","assignees_url":"https://api.github.com/repos/restic/restic/assignees{/user}","branches_url":"https://api.github.com/repos/restic/restic/branches{/branch}","tags_url":"https://api.github.com/repos/restic/restic/tags","blobs_url":"https://api.github.com/repos/restic/restic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/restic/restic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/restic/restic/git/refs{/sha}","trees_url":"https://api.github.com/repos/restic/restic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/restic/restic/statuses/{sha}","languages_url":"https://api.github.com/repos/restic/restic/languages","stargazers_url":"https://api.github.com/repos/restic/restic/stargazers","contributors_url":"https://api.github.com/repos/restic/restic/contributors","subscribers_url":"https://api.github.com/repos/restic/restic/subscribers","subscription_url":"https://api.github.com/repos/restic/restic/subscription","commits_url":"https://api.github.com/repos/restic/restic/commits{/sha}","git_commits_url":"https://api.github.com/repos/restic/restic/git/commits{/sha}","comments_url":"https://api.github.com/repos/restic/restic/comments{/number}","issue_comment_url":"https://api.github.com/repos/restic/restic/issues/comments{/number}","contents_url":"https://api.github.com/repos/restic/restic/contents/{+path}","compare_url":"https://api.github.com/repos/restic/restic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/restic/restic/merges","archive_url":"https://api.github.com/repos/restic/restic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/restic/restic/downloads","issues_url":"https://api.github.com/repos/restic/restic/issues{/number}","pulls_url":"https://api.github.com/repos/restic/restic/pulls{/number}","milestones_url":"https://api.github.com/repos/restic/restic/milestones{/number}","notifications_url":"https://api.github.com/repos/restic/restic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/restic/restic/labels{/name}","releases_url":"https://api.github.com/repos/restic/restic/releases{/id}","deployments_url":"https://api.github.com/repos/restic/restic/deployments","created_at":"2014-04-27T14:07:58Z","updated_at":"2019-11-22T19:23:08Z","pushed_at":"2019-11-22T19:17:02Z","git_url":"git://github.com/restic/restic.git","ssh_url":"git@github.com:restic/restic.git","clone_url":"https://github.com/restic/restic.git","svn_url":"https://github.com/restic/restic","homepage":"https://restic.net","size":58466,"stargazers_count":8756,"watchers_count":8756,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":604,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":434,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":604,"open_issues":434,"watchers":8756,"default_branch":"master"}},"base":{"label":"restic:master","ref":"master","sha":"8a54a0f5ac3e24078d294af7e02d388bfac2c3de","user":{"login":"restic","id":10073512,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMDczNTEy","avatar_url":"https://avatars3.githubusercontent.com/u/10073512?v=4","gravatar_id":"","url":"https://api.github.com/users/restic","html_url":"https://github.com/restic","followers_url":"https://api.github.com/users/restic/followers","following_url":"https://api.github.com/users/restic/following{/other_user}","gists_url":"https://api.github.com/users/restic/gists{/gist_id}","starred_url":"https://api.github.com/users/restic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/restic/subscriptions","organizations_url":"https://api.github.com/users/restic/orgs","repos_url":"https://api.github.com/users/restic/repos","events_url":"https://api.github.com/users/restic/events{/privacy}","received_events_url":"https://api.github.com/users/restic/received_events","type":"Organization","site_admin":false},"repo":{"id":19205896,"node_id":"MDEwOlJlcG9zaXRvcnkxOTIwNTg5Ng==","name":"restic","full_name":"restic/restic","private":false,"owner":{"login":"restic","id":10073512,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMDczNTEy","avatar_url":"https://avatars3.githubusercontent.com/u/10073512?v=4","gravatar_id":"","url":"https://api.github.com/users/restic","html_url":"https://github.com/restic","followers_url":"https://api.github.com/users/restic/followers","following_url":"https://api.github.com/users/restic/following{/other_user}","gists_url":"https://api.github.com/users/restic/gists{/gist_id}","starred_url":"https://api.github.com/users/restic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/restic/subscriptions","organizations_url":"https://api.github.com/users/restic/orgs","repos_url":"https://api.github.com/users/restic/repos","events_url":"https://api.github.com/users/restic/events{/privacy}","received_events_url":"https://api.github.com/users/restic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/restic/restic","description":"Fast, secure, efficient backup program","fork":false,"url":"https://api.github.com/repos/restic/restic","forks_url":"https://api.github.com/repos/restic/restic/forks","keys_url":"https://api.github.com/repos/restic/restic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/restic/restic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/restic/restic/teams","hooks_url":"https://api.github.com/repos/restic/restic/hooks","issue_events_url":"https://api.github.com/repos/restic/restic/issues/events{/number}","events_url":"https://api.github.com/repos/restic/restic/events","assignees_url":"https://api.github.com/repos/restic/restic/assignees{/user}","branches_url":"https://api.github.com/repos/restic/restic/branches{/branch}","tags_url":"https://api.github.com/repos/restic/restic/tags","blobs_url":"https://api.github.com/repos/restic/restic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/restic/restic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/restic/restic/git/refs{/sha}","trees_url":"https://api.github.com/repos/restic/restic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/restic/restic/statuses/{sha}","languages_url":"https://api.github.com/repos/restic/restic/languages","stargazers_url":"https://api.github.com/repos/restic/restic/stargazers","contributors_url":"https://api.github.com/repos/restic/restic/contributors","subscribers_url":"https://api.github.com/repos/restic/restic/subscribers","subscription_url":"https://api.github.com/repos/restic/restic/subscription","commits_url":"https://api.github.com/repos/restic/restic/commits{/sha}","git_commits_url":"https://api.github.com/repos/restic/restic/git/commits{/sha}","comments_url":"https://api.github.com/repos/restic/restic/comments{/number}","issue_comment_url":"https://api.github.com/repos/restic/restic/issues/comments{/number}","contents_url":"https://api.github.com/repos/restic/restic/contents/{+path}","compare_url":"https://api.github.com/repos/restic/restic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/restic/restic/merges","archive_url":"https://api.github.com/repos/restic/restic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/restic/restic/downloads","issues_url":"https://api.github.com/repos/restic/restic/issues{/number}","pulls_url":"https://api.github.com/repos/restic/restic/pulls{/number}","milestones_url":"https://api.github.com/repos/restic/restic/milestones{/number}","notifications_url":"https://api.github.com/repos/restic/restic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/restic/restic/labels{/name}","releases_url":"https://api.github.com/repos/restic/restic/releases{/id}","deployments_url":"https://api.github.com/repos/restic/restic/deployments","created_at":"2014-04-27T14:07:58Z","updated_at":"2019-11-22T19:23:08Z","pushed_at":"2019-11-22T19:17:02Z","git_url":"git://github.com/restic/restic.git","ssh_url":"git@github.com:restic/restic.git","clone_url":"https://github.com/restic/restic.git","svn_url":"https://github.com/restic/restic","homepage":"https://restic.net","size":58466,"stargazers_count":8756,"watchers_count":8756,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":604,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":434,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":604,"open_issues":434,"watchers":8756,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/restic/restic/pulls/2489"},"html":{"href":"https://github.com/restic/restic/pull/2489"},"issue":{"href":"https://api.github.com/repos/restic/restic/issues/2489"},"comments":{"href":"https://api.github.com/repos/restic/restic/issues/2489/comments"},"review_comments":{"href":"https://api.github.com/repos/restic/restic/pulls/2489/comments"},"review_comment":{"href":"https://api.github.com/repos/restic/restic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/restic/restic/pulls/2489/commits"},"statuses":{"href":"https://api.github.com/repos/restic/restic/statuses/5f22a2873b7a497dce5889b870217dcd43a426bd"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"rawtaz"}}