duplicity cannot back up files from Russian file directory

Bug #1313966 reported by Özgür
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned
duplicity (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

Any user of the gio backend in duplicity (used by Deja Dup) backing up to a directory with utf8 characters in it is unable to complete a single backup.

[Test Case]

mkdir /tmp/source
echo test > /tmp/source/test
mkdir /tmp/Ж
duplicity --gio --no-encryption /tmp/source file:///tmp/Ж

[Regression Potential]

The upstream patch to fix this mostly affects various exception or logging code paths. But each one is pretty simple change (just upgrading ascii to unicode).

[Original Report]

After upgrading to Ubuntu 14.04 from 13.10, Duplicity cannot backup files. The location it will backup and the location to backup have both Russian characters in path. I believe this is the reason of the problem.

After failure, duplicity shows this log:
------------------------------
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1494, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1488, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1337, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1470, in do_backup
    incremental_backup(sig_chain)
  File "/usr/bin/duplicity", line 637, in incremental_backup
    globals.backend)
  File "/usr/bin/duplicity", line 424, in write_multivol
    (tdp, dest_filename, vol_num)))
  File "/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py", line 145, in schedule_task
    return self.__run_synchronously(fn, params)
  File "/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py", line 171, in __run_synchronously
    ret = fn(*params)
  File "/usr/bin/duplicity", line 423, in <lambda>
    async_waiters.append(io_scheduler.schedule_task(lambda tdp, dest_filename, vol_num: put(tdp, dest_filename, vol_num),
  File "/usr/bin/duplicity", line 314, in put
    backend.put(tdp, dest_filename)
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/giobackend.py", line 145, in put
    self.copy_file('put', source_file, target_file)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 330, in iterate
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/giobackend.py", line 130, in copy_file
    log.Info(_("Writing %s") % target.get_parse_name())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 36: ordinal not in range(128)

-------------------------------
I believe the related script shall be fixed with "u" prefix, as explained here:
http://stackoverflow.com/questions/9644099/python-ascii-codec-cant-decode-byte

Ozgur

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: duplicity 0.6.23-1ubuntu4
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic i686
ApportVersion: 2.14.1-0ubuntu3
Architecture: i386
CurrentDesktop: Unity
Date: Tue Apr 29 01:37:39 2014
SourcePackage: duplicity
UpgradeStatus: Upgraded to trusty on 2014-04-18 (10 days ago)

Related branches

Revision history for this message
Özgür (ozgurkinaci) wrote :
Revision history for this message
Michael Terry (mterry) wrote :

Upstream has fixed this in trunk coincidentally already, by moving the "Writing %s" line elsewhere and not using the full path name.

Changed in duplicity:
status: New → Fix Committed
Michael Terry (mterry)
description: updated
description: updated
Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.6.24
Michael Terry (mterry)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package duplicity - 0.6.23-1ubuntu5

---------------
duplicity (0.6.23-1ubuntu5) utopic; urgency=medium

  * debian/patches/exception-encode.patch:
    - More encoding issue fixes, this time with filenames in exceptions
      and if the target path has utf8 characters in it. LP: #1289288,
      LP: #1311176, LP: #1313966
 -- Michael Terry <email address hidden> Tue, 29 Apr 2014 20:16:15 -0400

Changed in duplicity (Ubuntu):
status: New → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Özgür, or anyone else affected,

Accepted duplicity into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/duplicity/0.6.23-1ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in duplicity (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Özgür (ozgurkinaci) wrote :

Thanks a lot Brian, Kenneth, Michael and anyone who has contributed to the solution.
It works fine for me. duplicity backed up the same location after upgrading to proposed version.

Changed in duplicity (Ubuntu Trusty):
status: Fix Committed → Confirmed
status: Confirmed → Fix Committed
Michael Terry (mterry)
tags: added: verification-done
removed: verification-needed
Changed in duplicity:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package duplicity - 0.6.23-1ubuntu4.1

---------------
duplicity (0.6.23-1ubuntu4.1) trusty; urgency=medium

  * debian/patches/exception-encode.patch:
    - Fix exception when backing up to a directory with utf8 characters
      in its path when using the gio backend (as deja-dup does).
      LP: #1313966
    - Fix a couple more encoding issues during exception handling. These
      bits aren't as critical, but are bundled in same patch from upstream
      and are still useful. LP: #1289288, LP: #1311176
 -- Michael Terry <email address hidden> Tue, 29 Apr 2014 20:16:15 -0400

Changed in duplicity (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for duplicity has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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.