Can't restore files in a read-only directory

Bug #483631 reported by Michael Terry
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Déjà Dup
Fix Released
Medium
Michael Terry
10
Fix Released
Medium
Michael Terry
11
Fix Released
Medium
Michael Terry
deja-dup (Ubuntu)
Fix Released
Undecided
Unassigned
Karmic
Fix Released
Undecided
Unassigned

Bug Description

Let's say your backup contains a directory without write permissions (a common example is apparently the Jaunty Ubuntu One directory). When restoring that directory, you will get errors about any files under that directory (because Deja Dup can't move files into it!).

The fix is to set directory permissions after writing subfiles and to fallback to copying from the temporary restore directory if moves don't work.

For an Ubuntu 9.10 SRU:

There are three closely related bugs:
 - Restoring files from a read-only directory fails
 - Restoring a file from a directory that doesn't exist yet fails
 - Restoring a single file downloads all files

The first two can manifest themselves as data loss (or at least, no easy way to get your data that is locked inside your backup). The last could make it very difficult to restore specific data if you are short on disk space (would need to use a different computer). Thus, the SRU request.

The first (read-only directory) is more common than the other problems -- apparently the Jaunty Ubuntu One folder was read-only.

This was fixed in Lucid by pushing new upstream version 11.1-0ubuntu1, which included the fix. The attached patch for Karmic is modified from upstream bug-fix release 10.3.

To reproduce, create a folder that is read only. Put some files in it. Back up that folder with Deja Dup. Move the folder out of the way. Run Deja Dup, click restore, and restore the files in their original location. With 10.2, it fails. With 10.2+patch, it succeeds.

There shouldn't be much of a regression potential. The code changes are light.

Michael Terry (mterry)
Changed in deja-dup:
assignee: nobody → Michael Terry (mterry)
importance: Undecided → Medium
milestone: none → 12.0
status: New → Fix Committed
Revision history for this message
Michael Terry (mterry) wrote :

Here's a karmic debdiff to update to Deja Dup 10.3, which will fix this bug and another (bug 481582).

I think this is useful as an SRU, because this could manifest as data loss if you can't restore files from your backup that are in a read-only directory. It's not clear that this is very common, but apparently Jaunty's Ubuntu One folder was read-only? My karmic folder isn't, but I saw a user that never changed that who had a read-only Ubuntu One folder.

I'm not worried about Lucid, because it will eventually update to 11.1 or later, which has these fixes. I can update that later this cycle.

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

PPA testing package is here: https://launchpad.net/~mterry/+archive/ppa/+packages

I should note that 10.3 only has the two bug fixes mentioned and a bunch of translation updates. It's not a feature release.

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

Michael, this is an enormous debdiff containing both the bugfixes and translation updates and other things.... Is there a good reason for this decision as opposed to isolated bugfix patch backports for a SRU? (the latter is preferred/expected by StableReleaseUpdates policies)

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

OK, can make an isolated bugfix patch. I figured bug-fix point releases were acceptable for universe. Will revise patch to just include bugfixes from 10.3.

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

OK, here is a patch with just the 10.3 bugfixes (no translation/automake changes).

It does three things:
 - Allow restoring files in a read-only directory
 - Allow restoring a file from a directory that doesn't exist yet
 - Don't download all files to restore just one

The first two can manifest themselves as data loss (or at least, no easy way to get your data that is locked inside your backup). The last could make it very difficult to restore specific data if you are short on disk space (would need to use a different computer). Thus, the SRU request.

Please re-review. Thanks!

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

Much better, this debdiff looks good, except make karmic -> karmic-proposed to be able to upload it.

ACK from MOTU-SRU for this debdiff!

P.S. To facilitate verification, please edit the original description of the bug to include the information from https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Michael Terry (mterry)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
deja-dup (11.1-0ubuntu1) lucid; urgency=low

  * New upstream release
    - Fixes some restore issues (LP: #483631 and LP: #481582)
    - Can delete old backups (LP: #325005)
    - Can cleanly handle changed hostnames (LP: #454591)
  * Drop 01_lpi.patch: It doesn't make sense to include launchpad
    integration for a non-main app (no translation page). Plus, deja-dup
    already has such links for its own upstream LP page.
  * debian/control: Update dependencies
 -- Michael Terry <email address hidden> Sun, 22 Nov 2009 09:39:39 -0600

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

OK, I pushed the latest Deja Dup to Lucid and pushed my above debdiff to karmic-proposed. Should I add a verification-needed tag?

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

The archive admin accepting the upload will do that for you.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted deja-dup into karmic-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!

Changed in deja-dup (Ubuntu Karmic):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Michael Terry (mterry) wrote :

I tested all three bugfixes in the version in karmic-proposed. Worked for me.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
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 - 10.2-0ubuntu1.1

---------------
deja-dup (10.2-0ubuntu1.1) karmic-proposed; urgency=low

  * 02_restore-fixes.patch: Some restore fixes backported from 10.3:
    - Allow restoring files in a read-only directory (LP: #483631)
    - Don't download all files to restore just one (LP: #481582)
    - Allow restoring a file from a directory that doesn't exist yet
 -- Michael Terry <email address hidden> Mon, 16 Nov 2009 14:00:50 -0600

Changed in deja-dup (Ubuntu Karmic):
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.