-
-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create: implement retries for individual fs files
Errors handled for backup src files: - BackupOSError (converted from OSError), e.g. I/O Error - BackupError (stats race, file changed while we backed it up) Error Handling: - retry the same file after some sleep time - sleep time starts from 1ms, increases exponentially up to 10s - 10 tries If retrying does not help: - BackupOSError: skip the file, log it with "E" status - BackupError: last try will back it up, log it with "C" status Works for: - borg create's normal (builtin) fs recursion - borg create --paths-from-command - borg create --paths-from-stdin Notes: - update stats.files_stats late (so we don't get wrong stats in case of e.g. IOErrors while reading the file). - _process_any: no changes to the big block, just indented for adding the retry loop and the try/except. - test_create_erroneous_file succeeds because we retry the file.
- Loading branch information
1 parent
6da5b7d
commit 7e6afc9
Showing
3 changed files
with
110 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters