Try overwriting file with an 0-byte file on delete failure (workaround for Hetzner's backup backend)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Confirmed
|
Low
|
Unassigned |
Bug Description
I've run into an issue with the backup backend provided by Hetzner (a German provider):
when the backup space is full, you cannot remove any files, but have to overwrite the file with a 0-byte file of the same name. Only then you can delete the original file.
In duplicity the failure looks like this:
Running 'sftp -oServerAliveIn
State = sftp, Before = 'Connected to u123.your-
sftp command: 'cd "moby/"'
State = sftp, Before = 'cd "moby/"'
sftp command: 'rm "duplicity-
State = sftp, Before = 'rm "duplicity-
Removing /moby/duplicity
Could not delete file in command='sftp -oServerAliveIn
Running 'sftp -oServerAliveIn
Replaying this via "sftp" looks like this:
sftp> rm "duplicity-
Removing /moby/duplicity
Couldn't delete file: Failure
There are two issues here:
1. The error "Couldn't delete file: Failure" should get logged. At least with verbosity=9, but also with something like 4 (default?!).
2. At least in case of this exact error ("Couldn't delete file: Failure") it should try the following procedure:
upload a 0-byte file, overwriting the file that should get deleted. If this works, try the "rm" again.
Changed in duplicity: | |
status: | New → In Progress |
assignee: | nobody → Daniel Hahler (blueyed) |
Changed in duplicity: | |
importance: | Undecided → Medium |
Changed in duplicity: | |
importance: | Medium → Low |
Changed in duplicity: | |
status: | In Progress → Confirmed |
assignee: | Daniel Hahler (blueyed) → nobody |
Have you tried this yet? Did it work?