My laptop has just been repaired and I have a fresh, clean install of Ubuntu 18.04. I would like to restore the data in my home directory, using the backups I made on an external hard drive, using the Deja-dup backup tool. But it does not work at all, and I am in serious trouble. I first tried using the graphical user interface, but the error message was not informative. After a look at various posts, I tried the command line:
duplicity restore --no-encryption file:///media/path/to/backups /home/me/restore
where /home/me/restore
is a directory where I would like to restore my data, and /media/path/to/backups
is where the backup is stored, i.e., a directory with many files named duplicity-full.*.vol*.difftar.gz
.
The error message I get is:
Traceback (innermost last):
File "/usr/bin/duplicity", line 1555, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1541, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1393, in main
do_backup(action)
File "/usr/bin/duplicity", line 1472, in do_backup
restore(col_stats)
File "/usr/bin/duplicity", line 728, in restore
restore_get_patched_rop_iter(col_stats)):
File "/usr/bin/duplicity", line 750, in restore_get_patched_rop_iter
backup_chain = col_stats.get_backup_chain_at_time(time)
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 974, in get_backup_chain_at_time
raise CollectionsError("No backup chains found")
CollectionsError: No backup chains found
I also tried
duplicity list-current-files --no-encryption file:///media/path/to/backups/
which produces the same (error) output.
Edit: I have copied the content of /media/path/to/backups/
to a directory in my new home: /home/me/path/to/backups
.
The command:
$ ls -l *
outputs a list of files with the same permissions, similar to:
-rwxr-xr-x 1 me me 240414720 avril 3 17:16 duplicity-full.20200318T095811Z.vol100.difftar
where me
replaces my real user name.
The command:
$ sudo duplicity list-current-files --no-encryption file:///home/me/path/to/backups/
outputs:
gpg: Attention : le propriétaire du répertoire personnel « /home/me/.gnupg »
n'est pas sûr
Les métadonnées locales et distantes sont déjà synchronisées. Aucune synchronisation nécessaire.
Avertissement, jeux de sauvegarde incomplets trouvés, probablement laissés par des sessions interrompues
Date de la dernière sauvegarde complète : aucune
Traceback (innermost last):
File "/usr/bin/duplicity", line 1555, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1541, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1393, in main
do_backup(action)
File "/usr/bin/duplicity", line 1476, in do_backup
list_current(col_stats)
File "/usr/bin/duplicity", line 702, in list_current
sig_chain = col_stats.get_signature_chain_at_time(time)
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 998, in get_signature_chain_at_time
raise CollectionsError("No signature chains found")
CollectionsError: No signature chains found
So it seems pointless to test the restoration of a single file.
I could not find a file with "signature" in its name at this place.
However, I use [this post]Extract duplicity files manually to extract manually the content of the backup. It happens that for 8 .gz file, extraction fails with an error:
gzip: duplicity-full.20200318T095811Z.vol57.difftar.gz: invalid compressed data--format violated
So in the end, I was able to recover a (tiny) fraction of my data, and I have lost hope completely for the rest.
I might have done something wrong (this is difficult to trace now), but at the very least, duplicity did not warn me that the backup was corrupted.
sudo duplicity list-current-files
but the message stays the same.