Catch all OS errors when removing old local backups
Errors other than a missing directory or denied permission (e.g. read-only filesystem, device busy) ended in a traceback after the backup.
This commit is contained in:
@@ -405,6 +405,9 @@ class Backup:
|
||||
except PermissionError:
|
||||
logger.error(
|
||||
'Error while removing backup %s. Permission denied', dirs[i])
|
||||
except OSError as e:
|
||||
# E.g. read-only filesystem or device busy
|
||||
logger.error('Error while removing backup %s. %s', dirs[i], e.strerror or e)
|
||||
|
||||
self._removed_count = count
|
||||
|
||||
|
||||
Reference in New Issue
Block a user