Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Duplicity Restore
PostPosted: Sun Mar 13, 2011 4:22 am 
Offline
Junior Member

Joined: Sat Sep 18, 2010 7:49 pm
Posts: 24
I am very confused as to how Duplicity works. I set up a backup script with duplicity to amazon s3 and it works great.
Code:
#duplicity \
#    --encrypt-key=${GPG_KEY} \
#    --sign-key=${GPG_KEY} \
#    --include=/var/www \
#    --exclude=/** \
#    ${SOURCE} ${DEST}


my restore looks like this
Code:
#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???


Top
   
 Post subject:
PostPosted: Sun Mar 13, 2011 10:02 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Duplicity, by default, knows nothing. What is ${DEST} set to, earlier in the script?

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Sun Mar 13, 2011 2:43 pm 
Offline
Junior Member

Joined: Sat Sep 18, 2010 7:49 pm
Posts: 24
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??


Top
   
 Post subject:
PostPosted: Sun Mar 13, 2011 6:10 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
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.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject: Scripts
PostPosted: Sun Mar 13, 2011 10:34 pm 
Offline
Junior Member

Joined: Sat Sep 18, 2010 7:49 pm
Posts: 24
Backup
Code:
#!/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
Code:
#!/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=


Top
   
 Post subject:
PostPosted: Sun Mar 13, 2011 10:37 pm 
Offline
Junior Member

Joined: Sat Sep 18, 2010 7:49 pm
Posts: 24
-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.

Code:
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: fos and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group