[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] problem with restores from S3
From: |
Russell Clemings |
Subject: |
Re: [Duplicity-talk] problem with restores from S3 |
Date: |
Thu, 9 Oct 2008 08:02:12 -0700 |
That works, thanks. My confusion lay in a misreading of the man page:
"Now suppose we accidentally delete /home/me and want to restore it
the way it was at the time of last backup:
duplicity scp://address@hidden/some_dir /home/me
Duplicity enters restore mode because the URL comes before the local
directory. If we wanted to restore just the file "Mail/article" in
/home/me as it was three days ago into /home/me/restored_file:
duplicity -t 3D --file-to-restore Mail/article
scp://address@hidden/some_dir /home/me/restored_file"
I took the first to be the command you use to restore a whole
directory, and the second to restore a single file. I guess the first
is actually used only if you want to overwrite the directory you're
restoring. I'm not brave enough for that.
For the archives:
# Restore entire /root directory to new /root1 directory
/usr/local/bin/duplicity -v9 --encrypt-key=${GPG_KEY} \
--sign-key=${GPG_KEY} --file-to-restore root s3+http://BUCKETNAME/ /root1
# Restore single file "filename.txt" to new location /root/filename.txt1
/usr/local/bin/duplicity -v9 --encrypt-key=${GPG_KEY} \
--sign-key=${GPG_KEY} --file-to-restore root/filename.txt
s3+http://BUCKETNAME/ \
/root/filename.txt1
# Restore /root by overwriting from last backup
/usr/local/bin/duplicity -v9 --encrypt-key=${GPG_KEY}
--sign-key=${GPG_KEY} \ s3+http://BUCKETNAME/ /root
rac
On 10/9/08, Tim Riemenschneider <address@hidden> wrote:
> That's probably a misunderstanding in the command-line-arguments:
>
> Russell Clemings schrieb:
>
> > address@hidden s3backup]# cat backup.sh
> > #!/bin/sh
> > export AWS_ACCESS_KEY_ID=XXXXXXXXX
> > export AWS_SECRET_ACCESS_KEY=XXXXXXXXX
> > export PASSPHRASE=XXXXXXXXX
> > export GPG_KEY=XXXXXXXXX
> > SOURCE=/
> > DEST=s3+http://BUCKETNAME
> >
>
> ^^^^^^^^^^^^
> Your destiniation is the root of your bucket.
>
> > http://s3.amazonaws.com/BUCKETNAME/duplicity-new-signatures.2008-10-08T01:51:13-04:00.to.2008-10-08T21:58:33-04:00.sigtar.gpg
> >
> http://s3.amazonaws.com/BUCKETNAME/duplicity-inc.2008-10-08T01:51:13-04:00.to.2008-10-08T21:58:33-04:00.manifest.gpg
> >
> http://s3.amazonaws.com/BUCKETNAME/duplicity-inc.2008-10-08T01:51:13-04:00.to.2008-10-08T21:58:33-04:00.vol1.difftar.gpg
> >
> http://s3.amazonaws.com/BUCKETNAME/duplicity-inc.2008-10-08T01:51:13-04:00.to.2008-10-08T21:58:33-04:00.vol2.difftar.gpg
> >
> >
>
> The files are directly in the root of your bucket.
>
> > Now, here's the restore script:
> > address@hidden s3backup]# cat restore.sh
> > #!/bin/sh
> > export AWS_ACCESS_KEY_ID=XXXXXXXXX
> > export AWS_SECRET_ACCESS_KEY=XXXXXXXXX
> > export PASSPHRASE=XXXXXXXXX
> > export GPG_KEY=XXXXXXXXX
> > /usr/local/bin/duplicity -v9 --encrypt-key=${GPG_KEY}
> > --sign-key=${GPG_KEY} s3+http://BUCKETNAME/root /root1
> >
>
> You try to restore from a directory root inside your bucket, that does
> not exist.
>
> > address@hidden s3backup]# ./restore.sh
> > Main action: restore
> > 0 files exist on backend
> >
>
> .... and duplicity says so.
>
> What you need is:
>
>
> /usr/local/bin/duplicity -v9 --encrypt-key=${GPG_KEY}
>
> --sign-key=${GPG_KEY} --file-to-restore root s3+http://BUCKETNAME/ /root1
>
> cu
> Tim
>