Duplicity fails with bad session key error

6,361

Solution 1

The author of Deja Dup has published https://wiki.gnome.org/Apps/DejaDup/PassphraseProblems2019 in which he describes possible reasons due to bugs in earlier versions of Deja Dup and bugs in the underlying duplicity.

TL;DR is that you might have entered a wrong password when being prompted. Unfortunately at least earlier versions of duplicity don't check if the passed passphrase equals the one used in past backups.

In my case the most recent backup files were encrypted with a wrong passphrase. Said document provides a command to check that. Thus, I simply deleted those and ran backup again.

Ubuntu 18.04 uses Deja Dup version 37.0 which still contains this bug. According to the document linked above, the bug is fixed as of 39.1.

Solution 2

probably a to gpg 2.1 upgrade issue as explained here

https://answers.launchpad.net/duplicity/+question/289102
and here
https://answers.launchpad.net/duplicity/+question/288602
with a workaround mentioned here
https://superuser.com/questions/984977/duplicity-restore-failing-no-secret-key

..ede/duply.net

Share:
6,361

Related videos on Youtube

C. Davis
Author by

C. Davis

Updated on September 18, 2022

Comments

  • C. Davis
    C. Davis almost 2 years

    This is the error:

    Error processing remote manifest (duplicity-inc.20180712T125810Z.to.20180719T130228Z.manifest.gpg): GPG Failed, see log below:
    ===== Begin GnuPG log =====
    gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
    gpg: AES256 encrypted data
    gpg: encrypted with 1 passphrase
    gpg: decryption failed: Bad session key
    ===== End GnuPG log =====
    
    • K7AAY
      K7AAY almost 6 years
      Has it ever worked, or is this the first time you have tried it on this PC? If running this from a script, please include script; otherwise please include the command line text used to run duplicity. Please amend the original post to include these details by clicking on edit above.
    • Organic Marble
      Organic Marble almost 6 years
      Are you backing up? Restoring?
    • C. Davis
      C. Davis almost 6 years
      Has worked fine. I did do an update yesterday, but notes didn't mention backup util.
    • C. Davis
      C. Davis almost 6 years
      I didn't run duplicity from the command line, Backup does.
    • James Wilson
      James Wilson almost 6 years
      Try this restore by hand. I have had the same problem.
  • Sam
    Sam over 5 years
    This solution works for me, but I find it doesn't take effect until I either restart my machine or delete my backups and re-create them (thus re-setting the encryption password).
  • mcExchange
    mcExchange about 3 years
    Can I upgrade to 39.1 on Ubuntu 18.04? apt-get install --only-upgrade tells me that it's 'already the newest version'