purge fails for RsyncBackend if used in a multi-backend configuration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
The RsyncBackend class doesn't implement _delete() to support remote deletion, however it appears that when I use an Rsync backend and a B2 (backblaze) backend, the multibackend class tries to use _delete() from Rsync. I seemed to fix this by adding a delete method to the rsync backend like so:
def _delete(self, filename):
self.
but that seems rather inefficient. Perhaps the multi-backend logic needs to change?
Does the following patch seem like a good solution?
diff --git a/duplicity/
index 7c805ef..aaffd06 100644
--- a/duplicity/
+++ b/duplicity/
@@ -282,7 +282,10 @@ class MultiBackend(
for s in self.__stores:
list = s.list()
if filename in list:
- s._do_delete(
+ if hasattr(s, '_delete_list'):
+ s._do_delete_
+ elif hasattr(s, '_delete'):
+ s._do_delete(
# In stripe mode, only one item will have the file
if self.__mode == 'stripe':
Changed in duplicity: | |
status: | New → Fix Committed |
importance: | Undecided → Medium |
milestone: | none → 0.8.05 |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
Oops, the formatting of the patch in the comment box is wrong. Here's the patch