Old backups are not deleted on Google Drive
Bug #1306242 reported by
Nichlas
This bug affects 11 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I use version 0.6.23 and backup my files to Google Drive with the gdocs command.
My problem is that duplicity don't delete old full backups when i ask it to cleanup.
Instead all the files end up as files with no category/folder, and are still taking up a lot of space - and because there are a large number of files it is not trivial to find them and delete them (this is mostly Google's fault, as it is hard to finde files with no folder, that also don't belong in the top folder).
The only other mention i found about this was this mail on the mailing list: https:/
Changed in duplicity: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
To post a comment you must log in.
I have found out the root cause and a fix for this. It only happens when you are backing up into a Google Drive "folder", i.e. not the root collection of Drive. When this is being done, the "delete" action of the gdata api only removes the file from the collection, not from drive, so the file ends up in the root collection instead of being deleted.
The solution is to delete the file by its resource_id, so in gdocsbackend inside the delete function, instead of delete( entry.get_ edit_link( ).href + '?delete=true', force=True) delete( self.client. get_doc( entry.resource_ id.text) .get_edit_ link(). href + '?delete=true', force=True)
> self.client.
it needs to read
> self.client.
I have tested and verified that this works with 0.6.18 on Ubuntu 12.04.