Upgrade restore from backup errors

Rebuilt DigitalOcean droplet to Ubuntu 18.04 without a hitch, but having trouble restoring backup. I tried different variations of file paths to no avail.

root@box:~# pwd
/root
root@box:~# ls -al
total 92
drwx------ 7 root root 4096 Jan 17 22:45 .
drwxr-xr-x 25 root root 4096 Jan 17 22:48 …
-rw------- 1 root root 49 Jan 17 22:00 .Xauthority
-rw------- 1 root root 104 Jan 17 22:00 .bash_history
-rw-r–r-- 1 root root 3106 Apr 9 2018 .bashrc
drwx------ 4 root root 4096 Jan 17 22:30 .cache
-rw-r–r-- 1 root root 0 Jan 17 21:53 .cloud-locale-test.skip
drwx------ 3 root root 4096 Jan 17 22:31 .gnupg
-rw-r–r-- 1 root root 148 Aug 17 2015 .profile
-rw------- 1 root root 1024 Jan 17 22:17 .rnd
drwx------ 2 root root 4096 Jan 17 22:12 .ssh
-rw------- 1 root root 910 Jan 17 21:59 .viminfo
-rw-r–r-- 1 root root 204 Jan 17 22:17 .wget-hsts
drwxr-xr-x 2 root root 4096 Jan 17 23:24 duplicity-new-signatures.20190117T090
-rw-r–r-- 1 root root 28900 Jan 17 22:27 duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gpg
drwxr-xr-x 8 root root 4096 Jan 17 22:04 mailinabox
-rw-r–r-- 1 root root 2775 Jan 17 22:26 secret_key.txt

root@box:~# duplicity restore --force file:///root /home/user-data/
Local and Remote metadata are synchronized, no sync needed.
Warning, found the following local orphaned signature file:
duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gz
Warning, found the following remote orphaned signature file:
duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gpg
Last full backup date: none
Traceback (innermost last):
File “/usr/bin/duplicity”, line 1555, in
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

It looks like you have a directory of backup files there … and a wayward file here:

So my first suggestion is to get the backup files in one directory. The were in one directory in /home/user-data/backups/encrypted so they should be in one directory now.

Start there and let us know what happens.

I tried copying the backup file in to the directory and re-running but that didn’t work either.

root@box:~# cd duplicity-new-signatures.20190117T090/
root@box:~/duplicity-new-signatures.20190117T090# ls -al
total 40
drwxr-xr-x 2 root root 4096 Jan 17 23:24 .
drwx------ 7 root root 4096 Jan 17 22:45 …
-rw-r–r-- 1 root root 28900 Jan 17 23:24 duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gpg

root@box:~# sudo -E duplicity restore --force file:///root/duplicity-new-signatures.20190117T090/duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gpg /home/user-data/
Attempt 1 failed. OSError: [Errno 20] Not a directory: ‘/root/duplicity-new-signatures.20190117T090/duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gpg’
Attempt 2 failed. OSError: [Errno 20] Not a directory: ‘/root/duplicity-new-signatures.20190117T090/duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gpg’
Attempt 3 failed. OSError: [Errno 20] Not a directory: ‘/root/duplicity-new-signatures.20190117T090/duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gpg’
Attempt 4 failed. OSError: [Errno 20] Not a directory: ‘/root/duplicity-new-signatures.20190117T090/duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gpg’
Giving up after 5 attempts. OSError: [Errno 20] Not a directory: ‘/root/duplicity-new-signatures.20190117T090/duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gpg’
root@box:~#

Left this off…

root@box:~# sudo -E duplicity restore --force file:///root/duplicity-new-signatures.20190117T090 /home/user-data/
Local and Remote metadata are synchronized, no sync needed.
Warning, found the following local orphaned signature file:
duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gz
Warning, found the following remote orphaned signature file:
duplicity-new-signatures.20190117T090003Z.to.20190118T022602Z.sigtar.gpg
Last full backup date: none
Traceback (innermost last):
File “/usr/bin/duplicity”, line 1555, in
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

root@box:~#

I have exactly the same errors.

The backup is indeed a directory full of files – there are in my case 78 files, all .gpg and from their names I gather they are mostly diffs. I used the directory path in the command thus:

sudo -E duplicity restore --force file:///miab-bak/encrypted /home/user-data/

Can anyone tell me how to unpack them into a readable form, as they represent (I hope) more than a year of data.

TIA,

After several attempts, success. I ended up zipping up the entire /home/user-data/backup/ folder recursively, destroying/rebuilding to 18.04, copying it over to the new 18.04 droplet unzipping it, and pointing the restore to the …/backup/encrypted/ folder.