Hi all,
I came across Duplicity when looking for a way to back my linux server to S3.
I am trying to run Duplicity on a Virtual Server running CentOS5. I initially installed pexpect, python-devel, librsync, librsync-devel through Yum and GnuPGInterface initially through an RPM.
However, duplicity RPM install would fail complaining of missing libsync.so.1
I hence removed librsync and librsync-devel, reinstalled libsrync from tarball and librsync from Yum. Gave up on the RPM and installed duplicity through the tarball. Now duplicity failed with errors saying it could not find GnuPG. I removed the RPM and re-installed GnuPG from source and duplicity started launching.
Created a simple test file and was happy to find it worked:
#!/bin/sh
export AWS_ACCESS_KEY_ID=00000000000000000000
export AWS_SECRET_ACCESS_KEY=0000000000000000000000000000000000000000
/usr/bin/duplicity /home/balaji s3+
http://balaji.osbackup/home
The above script gives zero errors.
I then created a 1024-bit key using gpg and exported the PASSPHRASE per the documentation. Modified the script slightly to include encrypt-key option:
#!/bin/sh
export AWS_ACCESS_KEY_ID=00000000000000000000
export AWS_SECRET_ACCESS_KEY=0000000000000000000000000000000000000000
/usr/bin/duplicity --encrypt-key pubring.gpg /home/balaji s3+
http://balaji.osbackup/homeI had copied the
pubring.gp from ~/.gpg into /usr/bin/ and was executing the script as root. Once I try to run this script, I get lots of errors:
# sh test.sh
No signatures found, switching to full backup.
Traceback (most recent call last):
File "/usr/bin/duplicity", line 482, in ?
with_tempdir(main)
File "/usr/bin/duplicity", line 477, in with_tempdir
fn()
File "/usr/bin/duplicity", line 468, in main
full_backup(col_stats)
File "/usr/bin/duplicity", line 172, in full_backup
bytes_written = write_multivol("full", tarblock_iter, globals.backend)
File "/usr/bin/duplicity", line 102, in write_multivol
globals.gpg_profile,globals.volsize)
File "/usr/lib/python2.4/site-packages/duplicity/gpg.py", line 217, in GPGWriteFile
file.write(data)
File "/usr/lib/python2.4/site-packages/duplicity/gpg.py", line 125, in write
return self.gpg_input.write(buf)
IOError: [Errno 32] Broken pipe
close failed: [Errno 32] Broken pipe
Searching in the archives seems a bit hopeless as the broken pipe message seems fairly generic and there are no hits for self.gpg_input.write
Could you please tell me what I'm doing wrong? I'm sure it's something silly like I've got the syntax of encrypt-key wrong but haven't been able to get anything to work.
Many thanks!
Balaji