0.6.06, archive dir: cache desynchronization caused by remove*
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
note: this applies to 0.6.06 only, 0.6.05 works fine.
setup: i'm running duplicity gpg-encrypt-only to an rsync backend and the backup job has no access to
the private key - so any cache desync that requires stuff to be recopied from the backend and then
decrypted causes that backup run to fail. up to 0.6.05 that works perfectly on multiple machines.
0.6.06 does reject numerous duplicity-owned files on the backend (that's what -v 9 says, but the relevant
code doesn't tell me anything useful why the rejection happens): neither remove-if-older nor remove-all-but...
cleans them up, but they do get removed from the local cache (apparently every second run) - which causes
my resync problem (and which made the problem visible).
here's some evidence: this is the file listing on the backend after a remove-
duplicity-
duplicity-
duplicity-
duplicity-
...snipped to vol 67...
duplicity-
duplicity-
duplicity-
duplicity-
duplicity-
duplicity-
duplicity-
duplicity-
duplicity-
duplicity-
none of the 2009-12-10 stuff should be present anymore.
i'm attaching a redacted (minus key info and hostnames) logfile of collection-status -v 9 which
mentions the rejected older files and confirms that the one and only full backup is the 20091214 one (my timezone is GMT+10). the logfile then continues with a cleanup -v 9, which shows the same rejects and failure to clean
things up.
regards
az
regards
az
Changed in duplicity: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Kenneth Loafman (kenneth-loafman) |
Changed in duplicity: | |
status: | In Progress → Fix Committed |
milestone: | none → 0.6.07 |
Changed in duplicity: | |
assignee: | Kenneth Loafman (kenneth-loafman) → nobody |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
i've spent some more effort on tedious debugging but have found the problematic issue (and i've also got a patch):
the remove-* ops use BackupSet.delete() in collections.py, which has direct access to the names of the remote files to
remove, but does some guesswork for cached files in the archive dir; it (re)parses the filenames, then decides
which ones to remove purely based on time.
since 0.6.06 the removal of old stuff is less stringent, and old signatures are supposed to stay around - but BackupSet.delete()
hasn't been changed: it does, indeed, remove files of type new-sig - whereas the rest of delete() doesn't remove new-sig stuff
from the remote archive anymore.
this causes the cache to desynchronize, the next backup operation requires a resync, and that fails miserably if one uses --encrypt-key and runs the backups non-interactively.
the solution is simple: delete() needs to ignore files in the cache that are of type new-sig.
regards
az