Bug 922576

Summary: Data corruption when resuming
Product: [Fedora] Fedora Reporter: Michael Terry <mike>
Component: duplicityAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: lsof, metherid, redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-01 22:23:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
test script
none
Patch against 0.6.20
none
Patch against 0.6.18 none

Description Michael Terry 2013-03-18 00:41:46 UTC
Created attachment 711658 [details]
test script

Description of problem:

It's very easy to accidentally corrupt the backup copy of a file when resuming an interrupted backup.

Specifically, there are several ways to end up backing up corrupted data:

A) If resuming after a volume that ended in a one-block file, we would skip the first block of the next file.
B) If resuming after a volume that ended in a multi-block file, we would skip the first block of the next file.
C) If resuming a non-encrypted backup after a volume that spanned a multi-block file, we would skip some data inside the file.

These are all very similar but have slightly different code fixes. Together they amount to "if you resume a backup, it's very likely you will have corrupted data somewhere". The only situation that doesn't is resuming in the middle of a file while using encryption.

(This is upstream bug https://bugs.launchpad.net/duplicity/+bug/1091269 )

Version-Release number of selected component (if applicable):

This is fixed in upstream 0.6.21.  It is present in probably any version of duplicity >= 0.6.0.

How reproducible:

Reliably.

Steps to Reproduce:

1. Download the script 'auto-ctrl-c-test.sh' from this bug
2. sudo /bin/bash ./auto-ctrl-c-test.sh -s

Actual results:

There will be several lines at the end of the output explaining the difference between the original files and the restored ones.

Expected results:

It should end with "***** Diff between /lib and /tmp/restore" and no lines following.

Comment 1 Michael Terry 2013-03-18 00:48:44 UTC
Created attachment 711659 [details]
Patch against 0.6.20

Here's a patch against 0.6.20 for F18.

Comment 2 Michael Terry 2013-03-18 00:52:33 UTC
Created attachment 711660 [details]
Patch against 0.6.18

Here's a patch against 0.6.18 for F17.

Comment 3 Rahul Sundaram 2013-03-19 01:03:59 UTC
I have reviewed the upstream changelog and I think it is just better to push the latest upstream release to all active branches instead of cherry picking fixes.  I am going to attempt to do that now. 

@robert,  holler if you have a problem with that!

Comment 4 Fedora Update System 2013-03-19 01:32:13 UTC
duplicity-0.6.21-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/duplicity-0.6.21-1.fc18

Comment 5 Fedora Update System 2013-03-19 01:34:46 UTC
duplicity-0.6.21-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/duplicity-0.6.21-1.fc17

Comment 6 Fedora Update System 2013-03-19 03:19:37 UTC
duplicity-0.6.21-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/duplicity-0.6.21-1.el6

Comment 7 Fedora Update System 2013-03-19 03:29:42 UTC
duplicity-0.6.21-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/duplicity-0.6.21-1.el5

Comment 8 Fedora Update System 2013-03-19 21:26:58 UTC
Package duplicity-0.6.21-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing duplicity-0.6.21-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-0709/duplicity-0.6.21-1.el6
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2013-04-01 22:23:53 UTC
duplicity-0.6.21-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-04-01 22:35:13 UTC
duplicity-0.6.21-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2013-05-02 19:51:33 UTC
duplicity-0.6.21-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2013-05-02 19:53:19 UTC
duplicity-0.6.21-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.