{"action":"created","issue":{"url":"https://api.github.com/repos/ewxrjk/rsbackup/issues/7","labels_url":"https://api.github.com/repos/ewxrjk/rsbackup/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/ewxrjk/rsbackup/issues/7/comments","events_url":"https://api.github.com/repos/ewxrjk/rsbackup/issues/7/events","html_url":"https://github.com/ewxrjk/rsbackup/issues/7","id":35725487,"number":7,"title":"Backup pruning should be smarter","user":{"login":"ewxrjk","id":830656,"avatar_url":"https://avatars.githubusercontent.com/u/830656?v=3","gravatar_id":"","url":"https://api.github.com/users/ewxrjk","html_url":"https://github.com/ewxrjk","followers_url":"https://api.github.com/users/ewxrjk/followers","following_url":"https://api.github.com/users/ewxrjk/following{/other_user}","gists_url":"https://api.github.com/users/ewxrjk/gists{/gist_id}","starred_url":"https://api.github.com/users/ewxrjk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewxrjk/subscriptions","organizations_url":"https://api.github.com/users/ewxrjk/orgs","repos_url":"https://api.github.com/users/ewxrjk/repos","events_url":"https://api.github.com/users/ewxrjk/events{/privacy}","received_events_url":"https://api.github.com/users/ewxrjk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ewxrjk/rsbackup/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ewxrjk/rsbackup/milestones/5","html_url":"https://github.com/ewxrjk/rsbackup/milestones/3.0","labels_url":"https://api.github.com/repos/ewxrjk/rsbackup/milestones/5/labels","id":1052256,"number":5,"title":"3.0","description":"No idea when this will happen, right now.","creator":{"login":"ewxrjk","id":830656,"avatar_url":"https://avatars.githubusercontent.com/u/830656?v=3","gravatar_id":"","url":"https://api.github.com/users/ewxrjk","html_url":"https://github.com/ewxrjk","followers_url":"https://api.github.com/users/ewxrjk/followers","following_url":"https://api.github.com/users/ewxrjk/following{/other_user}","gists_url":"https://api.github.com/users/ewxrjk/gists{/gist_id}","starred_url":"https://api.github.com/users/ewxrjk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewxrjk/subscriptions","organizations_url":"https://api.github.com/users/ewxrjk/orgs","repos_url":"https://api.github.com/users/ewxrjk/repos","events_url":"https://api.github.com/users/ewxrjk/events{/privacy}","received_events_url":"https://api.github.com/users/ewxrjk/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-04-03T20:47:19Z","updated_at":"2015-04-03T20:47:31Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2014-06-14T10:22:24Z","updated_at":"2015-08-31T18:29:31Z","closed_at":null,"body":"Currently pruning involves removing the largest contiguous chunk of backups, starting at the oldest, which is consistent with the `prune-age` and `min-backups` constraints.\r\n\r\nThis doesn't make for very good use of storage space. An alternative policy would be to thin out backups non-contiguously. For instance the last week could keep daily backups, the rest of the last month could keep weekly backups and the rest of the last year could keep monthly backups.\r\n\r\nMore generally, an interface could be defined for operators to select completely arbitrary pruning policies."},"comment":{"url":"https://api.github.com/repos/ewxrjk/rsbackup/issues/comments/136454893","html_url":"https://github.com/ewxrjk/rsbackup/issues/7#issuecomment-136454893","issue_url":"https://api.github.com/repos/ewxrjk/rsbackup/issues/7","id":136454893,"user":{"login":"ewxrjk","id":830656,"avatar_url":"https://avatars.githubusercontent.com/u/830656?v=3","gravatar_id":"","url":"https://api.github.com/users/ewxrjk","html_url":"https://github.com/ewxrjk","followers_url":"https://api.github.com/users/ewxrjk/followers","following_url":"https://api.github.com/users/ewxrjk/following{/other_user}","gists_url":"https://api.github.com/users/ewxrjk/gists{/gist_id}","starred_url":"https://api.github.com/users/ewxrjk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewxrjk/subscriptions","organizations_url":"https://api.github.com/users/ewxrjk/orgs","repos_url":"https://api.github.com/users/ewxrjk/repos","events_url":"https://api.github.com/users/ewxrjk/events{/privacy}","received_events_url":"https://api.github.com/users/ewxrjk/received_events","type":"User","site_admin":false},"created_at":"2015-08-31T18:29:31Z","updated_at":"2015-08-31T18:29:31Z","body":"https://github.com/ewxrjk/rsbackup/tree/pruning-7 contains a just-written implementation. The degree of testing can be seen in the new test scripts.\r\nIt's slightly different from the design proposed above: the policy is invoked for each backup in turn, rather than being invoked once to get a list of backups to be pruned. However, it is provided a list of unpruned backup ages so it can still make decisions based on global information.\r\nFeedback welcome."}}