Can't restore from backup, password won't work after OS reinstall
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
$ duplicity -v8 list-current-files 'file:///media/kirsten/Oyen Digital UN2/Nigel Ubuntu backups'
Using archive dir: /home/kirsten/.cache/duplicity/dcafdb3f6f75243662cf0aaec88e3cba
Using backup name: dcafdb3f6f75243662cf0aaec88e3cba
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.cloudfilesbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.sshbackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.ftpbackend Succeeded
Import of duplicity.backends.u1backend Succeeded
Import of duplicity.backends.ftpsbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.botobackend Succeeded
Main action: list-current
================================================================================
duplicity 0.6.21 (January 23, 2013)
Args: /usr/bin/duplicity -v8 list-current-files file:///media/kirsten/Oyen Digital UN2/Nigel Ubuntu backups
Linux Nigel 3.8.0-31-generic #46-Ubuntu SMP Tue Sep 10 20:03:44 UTC 2013 x86_64 x86_64
/usr/bin/python 2.7.4 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3]
================================================================================
Synchronizing remote metadata to local cache...
PASSPHRASE variable not set, asking user.
GnuPG passphrase:
Copying duplicity-full-signatures.20130918T163827Z.sigtar.gpg to local cache.
Using temporary directory /tmp/duplicity-AdhEBH-tempdir
GPG error detail: Traceback (most recent call last):
File "/usr/bin/duplicity", line 1411, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1404, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1282, in main
sync_archive(decrypt)
File "/usr/bin/duplicity", line 1082, in sync_archive
copy_to_local(fn)
File "/usr/bin/duplicity", line 1029, in copy_to_local
gpg.GzipWriteFile(src_iter, tdp.name, size=sys.maxint)
File "/usr/lib/python2.7/dist-packages/duplicity/gpg.py", line 383, in GzipWriteFile
new_block = block_iter.next()
File "/usr/bin/duplicity", line 1009, in next
self.fileobj.close()
File "/usr/lib/python2.7/dist-packages/duplicity/dup_temp.py", line 225, in close
assert not self.fileobj.close()
File "/usr/lib/python2.7/dist-packages/duplicity/gpg.py", line 251, in close
self.gpg_failed()
File "/usr/lib/python2.7/dist-packages/duplicity/gpg.py", line 218, in gpg_failed
raise GPGError, msg
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
gpg: decryption failed: bad key
===== End GnuPG log =====
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
gpg: decryption failed: bad key
===== End GnuPG log =====
I entered my password at "GnuPG passphrase:" but, again, it doesn't seem to work.
I too must call it a night. I'll be back in the morning to see whether anyone has any suggestions. This looks for all the world like I just am not remembering the passphrase right, but it's written down, and it's worked before, as I said, after overwriting 12.04 with 13.04.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
This is not a case of a bad passphrase;
Code:
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
gpg: decryption failed: bad key
If it were you would see that in the log.
This is a case of a bad key, understandable when using scripts meant for backing up data files are used to back up things like keys.
EDIT
There are also at least 2 bugs out for Deja Dup for failing to store keys. Most recent one to Ubuntu where it will undoubtedly be ignored and one for openSuse from 5 months ago with no action.
I would think that both bugs would have at least been bumped up to Gnome but can't find anything in my short search.
I just checked on another PC that only data from backup directory and passphrase are enough to restore files. Can you install fresh system (the same you used for backuping, I think 13.04 32bit) on another PC or use Virtualbox and try to restore files?
Check also if you have any files in your cache dir "/home/kirsten/.cache/duplicity/dcafdb3f6f75243662cf0aaec88e3cba", rename "duplicity" directory, for example to "/home/kirsten/.cache/duplicity.bak" and try again with "duplicity -v8 list-current-files" - are some files occurred in this cache directory after that command?
Check also if you can restore files when you login as another user, use option to specify destination directory, other then orginal (you need also apropriate rights to backup directory).
Thanks, widget, for finding out about the bugs, and for helping me toward understanding that keys are not passphrases.
eSelix, I did reinstall 13.04 32bit (alongside 13.04 64bit), and tried restoring there, but met with the exact same behavior from Deja Dup. I don't have another functioning actual machine. Should I still try using Virtualbox, or is what I've already done sufficient?
Quote:
Check also if you have any files in your cache dir "/home/kirsten/.cache/duplicity/dcafdb3f6f75243662cf0aaec88e3cba", rename "duplicity" directory, for example to "/home/kirsten/.cache/duplicity.bak" and try again with "duplicity -v8 list-current-files" - are some files occurred in this cache directory after that command?
Code:
$ ls /home/kirsten/.cache/duplicity/dcafdb3f6f75243662cf0aaec88e3cba
duplicity-full-signatures.20130318T121641Z.sigtar.gz
duplicity-full-signatures.20130613T215637Z.sigtar.gz
Unfamiliar with the code for renaming, I used GUI File Manager to rename "/.cache/duplicity" to "/.cache/duplicity.bak". Then:
Code:
$ duplicity -v8 list-current-files
Command line error: Expected 1 args, got 0
Enter 'duplicity --help' for help screen.
Using temporary directory /tmp/duplicity-DSm13t-tempdir
Quote:
Check also if you can restore files when you login as another user, use option to specify destination directory, other then orginal (you need also apropriate rights to backup directory).
I tried adding a user with administrative privileges, but couldn't get that account enabled. I added a third user, who doesn't have permission to restore from backup. I don't dare try messing with permissions without some particular guidance, since I've never done that before. I could have a go, but I don't want to make helping me more difficult by mucking up permissions!
$ duplicity -v8 list-current-files 'file:///media/kirsten/Oyen Digital UN2/Nigel Ubuntu backups'
Using archive dir: /home/kirsten/.cache/duplicity/dcafdb3f6f75243662cf0aaec88e3cba
Using backup name: dcafdb3f6f75243662cf0aaec88e3cba
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.cloudfilesbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.sshbackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.ftpbackend Succeeded
Import of duplicity.backends.u1backend Succeeded
Import of duplicity.backends.ftpsbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.botobackend Succeeded
Main action: list-current
================================================================================
duplicity 0.6.21 (January 23, 2013)
Args: /usr/bin/duplicity -v8 list-current-files file:///media/kirsten/Oyen Digital UN2/Nigel Ubuntu backups
Linux Nigel 3.8.0-31-generic #46-Ubuntu SMP Tue Sep 10 20:03:44 UTC 2013 x86_64 x86_64
/usr/bin/python 2.7.4 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3]
================================================================================
Synchronizing remote metadata to local cache...
PASSPHRASE variable not set, asking user.
GnuPG passphrase:
Copying duplicity-full-signatures.20130318T121641Z.sigtar.gpg to local cache.
Using temporary directory /tmp/duplicity-Z3zgBA-tempdir
Deleting /tmp/duplicity-Z3zgBA-tempdir/mktemp-dApfZv-1
Deleting /tmp/duplicity-Z3zgBA-tempdir/mktemp-qym1Ml-2
Copying duplicity-full-signatures.20130613T215637Z.sigtar.gpg to local cache.
Deleting /tmp/duplicity-Z3zgBA-tempdir/mktemp-Cn0UoR-3
Deleting /tmp/duplicity-Z3zgBA-tempdir/mktemp-VFCahj-4
Copying duplicity-full-signatures.20130918T163827Z.sigtar.gpg to local cache.
GPG error detail: Traceback (most recent call last):
File "/usr/bin/duplicity", line 1411, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1404, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1282, in main
sync_archive(decrypt)
File "/usr/bin/duplicity", line 1082, in sync_archive
copy_to_local(fn)
File "/usr/bin/duplicity", line 1029, in copy_to_local
gpg.GzipWriteFile(src_iter, tdp.name, size=sys.maxint)
File "/usr/lib/python2.7/dist-packages/duplicity/gpg.py", line 383, in GzipWriteFile
new_block = block_iter.next()
File "/usr/bin/duplicity", line 1009, in next
self.fileobj.close()
File "/usr/lib/python2.7/dist-packages/duplicity/dup_temp.py", line 225, in close
assert not self.fileobj.close()
File "/usr/lib/python2.7/dist-packages/duplicity/gpg.py", line 251, in close
self.gpg_failed()
File "/usr/lib/python2.7/dist-packages/duplicity/gpg.py", line 218, in gpg_failed
raise GPGError, msg
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
gpg: decryption failed: bad key
===== End GnuPG log =====
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
gpg: decryption failed: bad key
===== End GnuPG log =====
I admit to being a bit lost by this point, so please continue to bear with me if I miss seemingly obvious things.
Here's the first try with the advice from the page I mentioned above:
Code:
$ gpg --multifile --decrypt duplicity-full.20130613T215637Z.*.difftar.gpg
gpg: can't open `duplicity-full.20130613T215637Z.*.difftar.gpg'
Here's the second try:
Code:
$ gpg --output duplicity-full.20130613T215637Z.vol1.difftar --decrypt duplicity-full.20130613T215637Z.vol1.difftar.gpg
gpg: can't open `duplicity-full.20130613T215637Z.vol1.difftar.gpg'
gpg: decrypt_message failed: file open error
Does this look like the effect of a bug? I did try the same commands on a couple of the other backup files, "full" volumes from an earlier date, with the same result.
Here's the first try with the advice from the page I mentioned above:
Code:
$ gpg --multifile --decrypt duplicity-full.20130613T215637Z.*.difftar.gpg
gpg: can't open `duplicity-full.20130613T215637Z.*.difftar.gpg'
That would be because no filenames matching that pattern exist in the current directory. Either cd to the directory where the files are or else use the full path.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.