2

I'm using duplicity 0.7.06 to back up and 0.7.17 to restore a duplicity backup. But I'm getting the error "No backup chains found" when trying to restore a directory from it.

I'm not sure what that error signifies though.

The backup is made like this (and there are no errors from this):

duplicity --no-encryption --full-if-older-than 10D /path/to/dir s3+http://my-s3-bucket/duplicity/dir

And I can see duplicity archives if I list them:

~$ s3cmd ls s3://my-s3-bucket/duplicity/dir/
2019-05-12 15:51     19505   s3://my-s3-bucket/duplicity/dir/duplicity-full-signatures.20190512T155147Z.sigtar.gz
2019-05-12 15:51       724   s3://my-s3-bucket/duplicity/dir/duplicity-full.20190512T155147Z.manifest
2019-05-12 15:51    728333   s3://my-s3-bucket/duplicity/dir/duplicity-full.20190512T155147Z.vol1.difftar.gz

I'm trying to restore it like this:

duplicity --file-to-restore path/to/dir s3+http://my-s3-bucket/duplicity /home/restored/dir

The error I'm getting is:

duplicity 0.7.17 (February 26, 2018)
Args: /usr/bin/duplicity --file-to-restore path/to/dir s3+http://my-s3-bucket/duplicity /home/restored/dir
Linux machinename 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64
/usr/bin/python2 2.7.15rc1 (default, Nov 12 2018, 14:31:15) 
[GCC 7.3.0]
================================================================================
Using temporary directory /tmp/duplicity-Zu29z3-tempdir
Temp has 30699757568 available, backup will use approx 272629760.
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
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

2 Answers 2

1

your restore command from above

duplicity --file-to-restore path/to/dir s3+http://my-s3-bucket/duplicity /home/restored/dir

lacks '/dir' at the end of the s3:// url. if it doesn't find your backups after adding it i suggest joining the duplicity mailing list and posting it there so we can try to find your issue in more detail.

..ede/duply.net

1
  • Ah - thanks! Your answer, while it didn't provide the actual solution, gave me a clue to the correct approach. Commented May 13, 2019 at 7:42
0

Following a clue in an answer from ede, I modified my restore line to add the name of the directory I wanted to restore to the end of the s3:// url:

s3+http://my-s3-bucket/duplicity/dir /home/restored

This then found the backup chain, but said it couldn't find "dir" in it.

I then tried removing the --file-to-restore switch to make the command as follows:

duplicity --no-encryption s3+http://my-s3-bucket/duplicity/dir /home/restored/dir

This worked.


As an aside, even when I've read the man page and looked at some examples, I find it hard to come up with a way of remembering how to correctly restore files from a duplicity archive. If anyone has a neat way of explaining how duplicity works relating to file paths and chains, I'd be grateful.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .