{"action":"created","issue":{"url":"https://api.github.com/repos/borgbackup/borg/issues/126","labels_url":"https://api.github.com/repos/borgbackup/borg/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/borgbackup/borg/issues/126/comments","events_url":"https://api.github.com/repos/borgbackup/borg/issues/126/events","html_url":"https://github.com/borgbackup/borg/issues/126","id":98375474,"number":126,"title":"Add --ignore-err16 N and --ignore-err13 N arguments","user":{"login":"tgharold","id":4880437,"avatar_url":"https://avatars.githubusercontent.com/u/4880437?v=3","gravatar_id":"","url":"https://api.github.com/users/tgharold","html_url":"https://github.com/tgharold","followers_url":"https://api.github.com/users/tgharold/followers","following_url":"https://api.github.com/users/tgharold/following{/other_user}","gists_url":"https://api.github.com/users/tgharold/gists{/gist_id}","starred_url":"https://api.github.com/users/tgharold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgharold/subscriptions","organizations_url":"https://api.github.com/users/tgharold/orgs","repos_url":"https://api.github.com/users/tgharold/repos","events_url":"https://api.github.com/users/tgharold/events{/privacy}","received_events_url":"https://api.github.com/users/tgharold/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-31T11:51:05Z","updated_at":"2015-08-02T00:10:24Z","closed_at":null,"body":"The goal here is that there are some folders where you will always get Error 16 (Device or resource busy) or Error 13 (permission denied).  Since you will always get those two errors and you don't want to play whack-a-mole with excludes, maybe allowing borg to squash those two errors from causing a non-zero return value would be useful.\r\n\r\n--ignore-err16 10 \r\n\r\nThat would tell borg that unless it sees more then (10) Errno 16 occurrences, that any [Errno 16] occurrences should be treated as warnings and not result in a non-zero exit code.  But once you hit the 11th event, start treating them as valid errors and let them affect the exit code.\r\n\r\nThe same approach could be taken for error 13 (permission denied, with --ignore-err13 N), or error 2 (locked files, with --ignore-err2 N).\r\n\r\nThis means that if you just backup /cygwin/c/Users/ - any locked files, permission issues, or device/resource busy errors could be ignored -- unless you get a large amount of them, which would indicate that a more serious issue then expected has occurred.\r\n\r\nI generally don't care if a few files don't get backed up.  And I don't want to be pestered daily because the backup program tells me about them every single day.  But I do care if hundreds of files did not get backed up, because that probably indicates that something more serious went wrong."},"comment":{"url":"https://api.github.com/repos/borgbackup/borg/issues/comments/126965620","html_url":"https://github.com/borgbackup/borg/issues/126#issuecomment-126965620","issue_url":"https://api.github.com/repos/borgbackup/borg/issues/126","id":126965620,"user":{"login":"tgharold","id":4880437,"avatar_url":"https://avatars.githubusercontent.com/u/4880437?v=3","gravatar_id":"","url":"https://api.github.com/users/tgharold","html_url":"https://github.com/tgharold","followers_url":"https://api.github.com/users/tgharold/followers","following_url":"https://api.github.com/users/tgharold/following{/other_user}","gists_url":"https://api.github.com/users/tgharold/gists{/gist_id}","starred_url":"https://api.github.com/users/tgharold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgharold/subscriptions","organizations_url":"https://api.github.com/users/tgharold/orgs","repos_url":"https://api.github.com/users/tgharold/repos","events_url":"https://api.github.com/users/tgharold/events{/privacy}","received_events_url":"https://api.github.com/users/tgharold/received_events","type":"User","site_admin":false},"created_at":"2015-08-02T00:10:24Z","updated_at":"2015-08-02T00:10:24Z","body":"Implementation might not be too difficult.  Assuming that you have a dictionary/list which lets you look up values by a key.\r\n\r\n1. Initialize two lists (or a list with multiple values for each key).  One is a count of errors that have occurred so far.  The other value to track is what the threshold is before those errors stop being treated as warnings.  The threshold for each error number would default to zero.  Number of entries in the list would be equal to the number of error conditions that you are willing to support.\r\n\r\n2. When an error occurs.  Increment the counter associated with that error number, then check against the error threshold.  If (count < threshold) then spit it out as a warning.  Else, spit it out as an error (and set the exit code).\r\n\r\nThe tracking of error counts could also be used in the --stats output to indicate: how many errors of each different type occurred (for counts > 0)"}}