Duplicity Restore

I am very confused as to how Duplicity works. I set up a backup script with duplicity to amazon s3 and it works great.

#duplicity \
#    --encrypt-key=${GPG_KEY} \
#    --sign-key=${GPG_KEY} \
#    --include=/var/www \
#    --exclude=/** \
#    ${SOURCE} ${DEST}

my restore looks like this

#duplicity list-current-files ${DEST}
duplicity \
--file-to-restore var/www \
${DEST} \
/root/restore

The restore works great from my linode.

but…

I transferred my gpg keys to another host (my desktop) and I tried running the restore script, and it shows that there are no files in the archive! It appears that duplicity created a new set of files for my desktop as if I was planning on setting up backup for it also.

It appears to keep the data isolated and detects which host is accessing the archive.

But I really need to be able to access the linode backup fles from my desktop computer! what is Duplicity doing to keep the two hosts data separate, and how do I force it to stop???

5 Replies

Duplicity, by default, knows nothing. What is ${DEST} set to, earlier in the script?

DEST=s3+http://myawsbox;

It is called DEST on the restore script because it is the same as the destination for the backup script.

Do you know why Duplicity only allows me to restore from the host I created the backup on? and how I can force it to restore on another host??

Try adding -vinfo to the duplicity command lines and post that output, along with the script? Again, duplicity doesn't care about the host that created the backup unless it is configured to do so.

Backup

#!/bin/bash
# Export some ENV variables so you don't have to type anything
export AWS_ACCESS_KEY_ID=(((((())))))))));
export AWS_SECRET_ACCESS_KEY=(((((())))))))))/KOR;
export PASSPHRASE=(((((())))))))))

GPG_KEY=(((((())))))))));

# The source of your backup
SOURCE=/

# The destination
# Note that the bucket need not exist
# but does need to be unique amongst all
# Amazon S3 users. So, choose wisely.
DEST=s3+http://(((((())))))))));

duplicity \
    --encrypt-key=${GPG_KEY} \
    --sign-key=${GPG_KEY} \
    --include=/var/www \
    --exclude=/** \
    ${SOURCE} ${DEST}

# Reset the ENV variables. Don't need them sitting around
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export PASSPHRASE=

Restore

#!/bin/bash
# Export some ENV variables so you don't have to type anything
export AWS_ACCESS_KEY_ID=(((((())))))))));
export AWS_SECRET_ACCESS_KEY=(((((())))))))))/KOR;
export PASSPHRASE=(((((())))))))))

GPG_KEY=(((((())))))))));

# The source of your backup
SOURCE=/

# The destination
# Note that the bucket need not exist
# but does need to be unique amongst all
# Amazon S3 users. So, choose wisely.
DEST=s3+http://(((((())))))))));

#duplicity \
#    --encrypt-key=${GPG_KEY} \
#    --sign-key=${GPG_KEY} \
#    --include=/var/www \
#    --exclude=/** \
#    ${SOURCE} ${DEST}

#duplicity list-current-files ${DEST}
duplicity \
--file-to-restore var/www \
${DEST} \
/root/restore

# Reset the ENV variables. Don't need them sitting around
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export PASSPHRASE=

-vinfo

it just says "not found in archive, no files restored."

but when I run it on the computer that created the backup, it lists the files just fine and lets me restore them.

Using archive dir: /Users/(((()))))))/.cache/duplicity/a219cf52e1036c77168c4d4ee2baafa4
Using backup name: a219cf52e1036c77168c4d4ee2baafa4
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.cloudfilesbackend Succeeded
Import of duplicity.backends.ftpbackend Succeeded
Import of duplicity.backends.giobackend Failed: No module named gio
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.sshbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Main action: restore
================================================================================
duplicity 0.6.11 (November 20, 2010)
Args: /opt/local/bin/duplicity -vinfo --file-to-restore var/www s3+http://(((()))) /root/restore
Darwin MyUser.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386 i386
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python 2.7.1 (r271:86832, Dec 18 2010, 21:51:16) 
[GCC 4.2.1 (Apple Inc. build 5664)]
================================================================================
Using temporary directory /var/folders/9Z/9ZHaW+hTFyWQybDOsS9drk+++TI/-Tmp-/duplicity-LglbNS-tempdir
Temp has 208259874816 available, backup will use approx 34078720.
Listing s3+http://(((()))))))
Local and Remote metadata are synchronized, no sync needed.
Listing s3+http://(((()))))))
Added incremental Backupset (start_time: Sat Mar 12 20:46:28 2011 / end_time: Sat Mar 12 23:17:25 2011)
Last full backup date: Sat Mar 12 20:46:28 2011
var/www not found in archive, no files restored.

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