zertrin / duplicity-backup.sh

Bash wrapper script for automated backups with duplicity supporting Amazon's S3 online storage as well as other storage destinations (ftp, rsync, sftp, local storage...).
https://zertrin.org/projects/duplicity-backup/
GNU General Public License v3.0
766 stars 187 forks source link

Restore error if no target name #1

Closed Zyles closed 12 years ago

Zyles commented 12 years ago

First I must say, great script. I had to look through the entire internet and was almost ready to pay someone to create sync to S3 for me.

I have gotten everything to backup to S3 which is nice.

But I am having trouble restoring. I have tried multiple commands. First I want to test to restore one file.

Here is an example:

./duplicity-backup.sh --restore-file /home/httpd/backups/dbdump_2012-04-03_13-00-52.tar.bz2

I get this: Restoring now ... ../duplicity-backup.sh: eval: line 366: unexpected EOF while looking for matching `'' ../duplicity-backup.sh: eval: line 367: syntax error: unexpected end of file

I try this:

./duplicity-backup.sh --restore-file dbdump_2012-04-03_13-00-52.tar.bz2

I get this:

Restoring now ... Traceback (most recent call last): File "/usr/bin/duplicity", line 1251, in with_tempdir(main) File "/usr/bin/duplicity", line 1244, in with_tempdir fn() File "/usr/bin/duplicity", line 1198, in main restore(col_stats) File "/usr/bin/duplicity", line 538, in restore restore_get_patched_rop_iter(col_stats)): File "/usr/bin/duplicity", line 560, in restore_get_patched_rop_iter backup_chain = col_stats.get_backup_chain_at_time(time) File "/usr/lib/python2.6/dist-packages/duplicity/collections.py", line 934, in get_backup_chain_at_time raise CollectionsError("No backup chains found") CollectionsError: No backup chains found

I have not tested the full restore yet, since the backup is 5GB.

I don't run as root, if that is required?

Thanks.

Zyles commented 12 years ago

I figured it out now. I ran a smaller test and it works.

The problem was me fiddling around and I changed the s3 path in the file so it could not restore.

Thats what happends when you don't sleep.

Thanks again for great script. I really hope to see --restore-dir however. That would help A LOT.

Zyles commented 12 years ago

Hi again.

Still seem to have this issue. The full restore works but not single files.

When I try the backup restore in a smaller scale test it works good but not on my 5GB backup.

For example I try to restore the Wordpress xmlrpc.php file, what do I need to type?

I have tried --restore-file with:

xmlrpc.php ./xmlrpc.php /home/httpd/httpd_home/httpd/domain.com/public_html/xmlrpc.php domain.com/public_html/xmlrpc.php

Either the file is not found or I get:

Restoring now ... ./duplicity-backup.sh: eval: line 366: unexpected EOF while looking for matching `'' ./duplicity-backup.sh: eval: line 367: syntax error: unexpected end of file

When I run this: ./duplicity-backup.sh --list-current-files | grep xmlrpc.php

It is found: Tue Dec 1 07:14:42 2009 domain.com/public_html/xmlrpc.php

Any help appreciated thanks.

Zyles commented 12 years ago

Ok figured it out now. The only syntax I can get working is:

duplicity-backup.sh --restore-file img/mom.jpg /home/user/i-love-mom.jpg

I need to explicitly give it a target name.

Just using:

duplicity-backup.sh --restore-file img/mom.jpg

Does not work for me as mentioned above.

Seems like a bug?

zertrin commented 12 years ago

Hi Zyles,

Sorry for this late response, I've been busy for the last few days.

I agree with you: there must be some bug somewhere, I'm going to look that.

From bare lecture of the code I suppose the problem happens at the line 530.

zertrin commented 12 years ago

I took time today to look closer at that bug and I think it is fixed in the new release (v0.7)