list-current-files fails if sync is needed

Bug #1828869 reported by Mgorse
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

If a sync is needed, then list-current-files now fails as follows:

GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: AES encrypted data
gpg: gcry_kdf_derive failed: Invalid data
gpg: encrypted with 1 passphrase
gpg: decryption failed: No secret key
===== End GnuPG log =====

Gpg is complaining because it is not given a passphrase, but the real issue seems to be that the collection is now initialized before the sync, rather than after it, and it is not properly updated, so duplicity looks for a sigtar.gpg file and tries to decrypt it even though it has already been decrypted and stored locally as part of the sync.

Also, the following check can cause a traceback on python 3, since sometimes a ParseResults sets a time, rather than start_time and end_time:
+ return parsed.end_time >= target_chain.start_time and \
+ parsed.start_time <= target_chain.end_time

Since parsed.start_time and parsed.end_time can be None, it looks as though the code may also behave incorrectly on python 2.

Related branches

Changed in duplicity:
status: New → In Progress
importance: Undecided → Medium
milestone: none → 0.8.00
Changed in duplicity:
status: In Progress → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
Revision history for this message
Daniel (daniel-krampe) wrote :

Although the bug has been closed it is still apparent when using the Deja Dup GUI.

Versions:
- Ubuntu 20.10
- duplicity 0.8.11.1612-1
- deja-dup 42.2-1ubuntu1

Steps to reproduce:
- Create a backup of the user home folder to an external USB device
- Install a fresh Ubuntu 20.10
- Open "Backups" (= Deja Dup) and recovery
- Select the USB drive as source -> Next
- Select the latest backup date -> Next

Error message:

GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: AES encrypted data
gpg: gcry_kdf_derive failed: Invalid data
gpg: encrypted with 1 passphrase
gpg: decryption failed: No secret key
===== End GnuPG log =====

Bypassing Deja Dup:

- Switch to Terminal
- export PASSPHRASE=MySecretKey
- duplicity list-current-files file:///media/daniel/USB-Drive/daniel-ThinkPad-X1

Duplicity lists all files - also recovery via Terminal works

duplicity --file-to-restore /home/daniel/.gnupg file:///media/daniel/USB-Drive/daniel-ThinkPad-X1 /home/daniel/.gnupg

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Seems you have a Catch-22. You need to restore ~/.gnupg from the backups, but you encrypted it to the backup and no secret key is available for restore. You need to manually copy the ~/.gnupg to your restore machine so it's available for restore to decrypt the backup.

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.