cannot change temp dir

Bug #1005901 reported by nocturo on 2012-05-29
This bug affects 4 people
Affects Status Importance Assigned to Milestone
duplicity (Ubuntu)
Louis Bouchard

Bug Description

SRU justification :

Duplicity does not honor the TMPDIR, TEMP, TMP or --tempdir redirection as expected.

Impact :

If the available size in /tmp is too small, restore may fail to complete

Fix :

Backport upstream fix applied in 0.6.21 (Merge proposal from the upstream task of this bug)

Test Case :
Note: Incremental backup is necessary so both the full & difftar are required in /tmp which will require more than 50Mb

1) Mount a 50Mb file system under /tmp
~# df -h /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 48M 794K 45M 2% /tmp

2) Create a 60Mb file to be backed up under /srv called data
dd if=/proc/kcore of=/srv/data bs=1M count=60

3) Do a full backup of /srv into /backup

duplicity full --name test --encrypt-key A6C785C2 --sign-key A6C785C2 --volsize 25 /srv file:///backup/duply

4) Modify the 60Mb file so it can be picked up by the incremental backup
dd if=/proc/kcore of=/srv/data bs=1M count=10 conv=notrunc oflag=append

5) Do an incremental backup
duplicity incr --name 'duply_test' --encrypt-key A6C785C2 --sign-key A6C785C2 --volsize 25 /srv file:///backup/duply

6) Restore the flag using TMPDIR :
TEMPDIR=/mytemp duplicity --name 'duply_test' --encrypt-key A6C785C2 --sign-key A6C785C2 --verbosity '4' --volsize 25 -t now file:///backup/duply /restore

With the patch, the command will succeed.

Regression :

None expected, this code is used in the version currently available in Raring

Description of the problem :

When /tmp is too small, duplicity is sometimes unable to do a restore. Using TMPDIR variable or --tempdir doe not work.

Related branches

nocturo (nocturo) on 2012-05-29
description: updated
edso ( wrote :
nocturo (nocturo) wrote :

That did it. I'll close this one out.

Changed in duplicity:
status: New → Fix Committed
Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.6.21
Changed in duplicity:
status: Fix Committed → Fix Released
Changed in duplicity (Ubuntu):
status: New → Fix Released
Louis Bouchard (louis) wrote :

backport of the 0.6.21 fix

Changed in duplicity (Ubuntu Precise):
assignee: nobody → Louis Bouchard (louis-bouchard)
status: New → In Progress
Louis Bouchard (louis) on 2013-07-09
description: updated
Marc Deslauriers (mdeslaur) wrote :

Thanks for the debdiff.

Could you please modify it to add patch headers, including one that links to this bug, and one that includes a link to the upstream commit (


Changed in duplicity (Ubuntu Precise):
status: In Progress → Incomplete
Marc Deslauriers (mdeslaur) wrote :

Please subscribe ubuntu-sponsors again once a new debdiff has been attached. Thanks!

Louis Bouchard (louis) wrote :

Here is the new debdiff with requested modification (patch header)

Changed in duplicity (Ubuntu Precise):
status: Incomplete → In Progress
Louis Bouchard (louis) wrote :

Any chance of having this debdiff sponsored for upload ?

Marc Deslauriers (mdeslaur) wrote :

Thanks for the updated debdiff!

I have uploaded a slightly modified version of it to precise-proposed. I updated the patch header to the appropriate format:


Hello nocturo, or anyone else affected,

Accepted duplicity into precise-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See 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 . Thank you in advance!

Changed in duplicity (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Louis Bouchard (louis) wrote :

Tested ok with reproduction steps above.

tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update 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.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package duplicity - 0.6.18-0ubuntu3.2

duplicity (0.6.18-0ubuntu3.2) precise; urgency=low

  * debian/patches/09tmpdirfix.dpatch:
    Allow correct use of TMPDIR (LP: #1005901)
 -- Louis Bouchard <email address hidden> Mon, 08 Jul 2013 16:37:19 +0200

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

Duplicates of this bug

Other bug subscribers