restore a folder duplicity and amazon s3

is it possible to restore a folder using duplicity and amazon s3?

I can restore the entire backup which is / to a folder but when I attempt to restore a folder like /etc/ to /tmp/etc/ it errors out.

Traceback (most recent call last):
  File "/usr/bin/duplicity", line 482, in <module>with_tempdir(main)
  File "/usr/bin/duplicity", line 477, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 441, in main
    restore(col_stats)
  File "/usr/bin/duplicity", line 223, in restore
    restore_get_patched_rop_iter(col_stats)):
  File "/usr/bin/duplicity", line 238, in restore_get_patched_rop_iter
    backup_chain = col_stats.get_backup_chain_at_time(time)
  File "/usr/lib/python2.5/site-packages/duplicity/collections.py", line 717, in get_backup_chain_at_time
    raise CollectionsError("No backup chains found")
duplicity.collections.CollectionsError: No backup chains found</module> 

I'm not using encryption at all just normal duplicity backup while testing things out.

duplicity  --no-encryption s3+http://LINODE_BACKUP/etc/  /tmp/etc/

5 Replies

Try:

duplicity --file-to-restore etc/ --no-encryption s3+http://LINODE_BACKUP /tmp/etc/ 

your command restores everything

It works for me (duplicity 0.6.04). Try add param –verbosity and analyze command output.

tried both /etc and etc/ but tells me its not in the archive?

etc/ not found in archive, no files restored.

OR

/etc/ not found in archive, no files restored.

very strange because if i dump the entire archive its there and restores but I don't see dumping the entire machine for one folder very efficient, I must be doing something wrong?

-rw–----- 1 root root 12288 2009-12-19 19:59 aquota.user

drwxr-xr-x 2 root root 2696 2009-09-21 09:28 bin

drwxr-xr-x 2 root root 48 2008-04-15 01:53 boot

drwxr-xr-x 103 root root 5192 2009-12-20 10:56 etc

drwxr-xr-x 13 root root 328 2009-12-03 22:18 home

drwxr-xr-x 2 root root 48 2008-05-29 16:51 initrd

drwxr-xr-x 12 root root 4792 2009-12-03 21:39 lib

lrwxrwxrwx 1 root root 4 2009-12-21 10:38 lib64 -> /lib

drwx------ 2 root root 48 2008-05-29 14:38 lost+found

drwxr-xr-x 2 root root 48 2008-05-29 16:51 media

drwxr-xr-x 2 root root 48 2008-05-29 16:51 opt

drwxr-xr-x 7 root root 864 2009-12-19 19:58 root

drwxr-xr-x 2 root root 3448 2009-09-21 09:28 sbin

I've installed s3fs filesystem and did a restore using that and it works !

duplicity –file-to-restore=etc file:///amazon/ etc/

thanks for your help still unsure on the restore but at least i can do a restore later if i need to.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct