[data-loss] Trying to keep backups 'forever' ends up keeping backups 6 months

Bug #590133 reported by Michael Terry
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Déjà Dup
Fix Released
Critical
Michael Terry
14
Fix Released
Critical
Michael Terry
deja-dup (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned

Bug Description

If the 'keep backups' preference is set to 'forever' (the default), Deja Dup will actually only keep backups for 6 months. This can lead to unexpected data loss.

In practice, it tends to keep them slightly under a year. A quick description of what happens:

1) First backup is a full backup
2) Incremental backups follow
3) Six months later a new full backup is made
4) Incremental backups follow
5) Six months later (now a fully year), a new full backup is made
6) The first backup and its incrementals are deleted <== This is the bug

The problem is that when a backup is finished and we check if we should delete old backups like the user asked, we never check for the special value 'forever'. Fix coming.

Michael Terry (mterry)
Changed in deja-dup:
assignee: nobody → Michael Terry (mterry)
importance: Undecided → Critical
milestone: none → 15.3
status: New → In Progress
Michael Terry (mterry)
Changed in deja-dup:
status: In Progress → Fix Committed
Michael Terry (mterry)
Changed in deja-dup:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package deja-dup - 15.3-0ubuntu1

---------------
deja-dup (15.3-0ubuntu1) maverick; urgency=low

  * New upstream release
    - Don't delete backups after 6 months if they are supposed to be
      kept forever. LP: #590133
 -- Michael Terry <email address hidden> Sat, 05 Jun 2010 14:51:14 -0400

Changed in deja-dup (Ubuntu):
status: New → Fix Released
Revision history for this message
Michael Terry (mterry) wrote :

For Ubuntu 10.04, here's a debdiff to update to 14.2.

Reproducing it is difficult unless you can wait around a year. I have a script I use for testing that reveals it. I'll upload that later this weekend, after tweaking it so it's easier for others to use.

Changed in deja-dup (Ubuntu Lucid):
status: New → Fix Committed
Revision history for this message
Michael Terry (mterry) wrote :

14.2 is also available for testing from the Deja Dup PPA: https://launchpad.net/~deja-dup-team/+archive/ppa

Revision history for this message
John Dong (jdong) wrote :

Typically the SRU team discourages submission of large debdiffs that bump up a version to fix the bug. However, filtering out the translation and autoconf noise, the patch is fairly reasonable and I don't have an issue ACKing it -- the additional fuzz poses a low regression risk.

ACK from the -sru team.

Revision history for this message
Michael Terry (mterry) wrote :

Here's the test script I mentioned. It's a pared-down, consolidated version of a test I added to the test suite for Deja Dup. Run it like "python forever-test.py". It will pop up a bunch of dialogs that will fill themselves in. It will *not* change your existing Deja Dup preferences. It will try to backup your current directory a few times to a folder in /tmp, adjust the time stamps of the backups, and then backup some more.

On 14.1, you'll see the following after a bunch of spew and dialogs:
** (deja-dup:11694): DEBUG: DuplicityInstance.vala:552: duplicity (11709) exited with value 0

Traceback (most recent call last):
  File "./delete", line 135, in run
    success = method()
  File "./delete", line 255, in forever
    assert num_manifests() == 3 and num_manifests('full') == 3
AssertionError
FAILED

On 14.2, you'll see:
** (deja-dup:12621): DEBUG: DuplicityInstance.vala:552: duplicity (12631) exited with value 0

PASSED

I'm sorry I can't provide an easier way to test this fix. The problem is that the bug exposes itself after a period of a year. So I found it by using my test suite, of which this script is a bastardization.

Revision history for this message
Jonathan Riddell (jr) wrote : Please test proposed package

Accepted into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Paul Elliott (omahn) wrote :

@mterry - I've attempted to test the update in -proposed but your script fails with the following:

  File "forever-test.py", line 135, in run
    success = method()
  File "forever-test.py", line 247, in forever
    backup_simple()
  File "forever-test.py", line 226, in backup_simple
    ldtp.click('frmDéjàDup', 'btnBackup')
  File "/usr/lib/pymodules/python2.6/ldtp/client.py", line 50, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/pymodules/python2.6/ldtp/client.py", line 99, in request
    raise LdtpExecutionError(e.faultString)
LdtpExecutionError: <unprintable LdtpExecutionError object>

Revision history for this message
Michael Terry (mterry) wrote :

Sorry for late response Paul. I just tried it myself and it worked. I think the missing piece is to go to System->Preferences->Assistive Technologies. Click 'Enable assistive technologies'. Then click 'Close and logout' and log back in. The script drives the interface using assistive technologies.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Lucid:
I have reproduced the problem with deja-dup 14.1-0ubuntu0.1 in lucid-updates and have verified that, using the script provided by Michael, the version of deja-dup 14.2-0ubuntu0.1 in -proposed fixes the issue.

Marking as verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote :

Copied to lucid-updates:

deja-dup (14.2-0ubuntu0.1) lucid-proposed; urgency=low

  * New upstream release
    - Don't delete backups after 6 months if they are supposed to be
      kept forever. LP: #590133

 -- Michael Terry <email address hidden> Sat, 05 Jun 2010 12:49:37 -0400

Changed in deja-dup (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.