I followed the above guide, but running the backup script results in this:
Code:
2008-11-27_17:11:24: Backup for local filesystem started
2008-11-27_17:11:24: ... removing old backups
No old backup sets found, nothing deleted.
2008-11-27_17:11:30: ... backing up filesystem
No signatures found, switching to full backup.
Traceback (most recent call last):
File "/usr/bin/duplicity", line 463, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 458, in with_tempdir
fn()
File "/usr/bin/duplicity", line 449, in main
full_backup(col_stats)
File "/usr/bin/duplicity", line 155, in full_backup
bytes_written = write_multivol("full", tarblock_iter, globals.backend)
File "/usr/bin/duplicity", line 87, in write_multivol
globals.gpg_profile,globals.volsize)
File "/usr/lib/python2.5/site-packages/duplicity/gpg.py", line 225, in GPGWriteFile
file.close()
File "/usr/lib/python2.5/site-packages/duplicity/gpg.py", line 132, in close
self.gpg_process.wait()
File "/var/lib/python-support/python2.5/GnuPGInterface.py", line 639, in wait
raise IOError, "GnuPG exited non-zero, with code %d" % (e << 8)
IOError: GnuPG exited non-zero, with code 131072
close failed: [Errno 32] Broken pipe
2008-11-27_17:11:31: Backup for local filesystem complete
2008-11-27_17:11:31: ------------------------------------
My backitup script is:
Code:
#!/bin/bash
# Export some ENV variables so you don't have to type anything
trace () {
stamp=`date +%Y-%m-%d_%H:%M:%S`
echo "$stamp: $*" >> /var/log/backup.log
}
export AWS_ACCESS_KEY_ID="xxxxxxxxxxxxxxxxx..."
export AWS_SECRET_ACCESS_KEY="xxxxxxxxxxxxxxxxxxxx..."
export PASSPHRASE=$(cat pwtextfile)
GPG_KEY=XXXXXXXX
OLDER_THAN="6M"
# 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://mybucketname.s3.amazonaws.com"
FULL=
if [ $(date +%d) -eq 1 ]; then
FULL=full
fi;
trace "Backup for local filesystem started"
trace "... removing old backups"
duplicity remove-older-than ${OLDER_THAN} ${DEST} >> /var/log/backup.log 2>&1
trace "... backing up filesystem"
duplicity \
${FULL} \
--encrypt-key=${GPG_KEY} \
--sign-key=${GPG_KEY} \
--include=/boot \
--exclude=/** \
${SOURCE} ${DEST} >> /var/log/backup.log 2>&1
trace "Backup for local filesystem complete"
trace "------------------------------------"
# Reset the ENV variables. Don't need them sitting around
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export PASSPHRASE=
I wanted to include only /boot for starts, not to waste bandwidth on testing. The /boot directory seems to be empty, but I creates a test text file there and it still didn't work so that doesn't seem to be an issue.
I used the defaults when generating my key.
EDIT: Hm, the output actually changed when I ran it with the test file created in /boot. It's this now:
Code:
2008-11-27_17:14:55: Backup for local filesystem started
2008-11-27_17:14:55: ... removing old backups
No old backup sets found, nothing deleted.
2008-11-27_17:14:55: ... backing up filesystem
No signatures found, switching to full backup.
Traceback (most recent call last):
File "/usr/bin/duplicity", line 463, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 458, in with_tempdir
fn()
File "/usr/bin/duplicity", line 449, in main
full_backup(col_stats)
File "/usr/bin/duplicity", line 155, in full_backup
bytes_written = write_multivol("full", tarblock_iter, globals.backend)
File "/usr/bin/duplicity", line 87, in write_multivol
globals.gpg_profile,globals.volsize)
File "/usr/lib/python2.5/site-packages/duplicity/gpg.py", line 213, in GPGWriteFile
data = block_iter.next(bytes_to_go).data
File "/usr/lib/python2.5/site-packages/duplicity/diffdir.py", line 407, in next
result = self.process(self.input_iter.next(), size)
File "/usr/lib/python2.5/site-packages/duplicity/diffdir.py", line 284, in get_delta_iter_w_sig
sigTarFile.close()
File "/usr/lib/python2.5/site-packages/duplicity/tarfile.py", line 508, in close
self.fileobj.write("\0" * (RECORDSIZE - remainder))
File "/usr/lib/python2.5/site-packages/duplicity/dup_temp.py", line 101, in write
return self.fileobj.write(buf)
File "/usr/lib/python2.5/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
2008-11-27_17:14:55: Backup for local filesystem complete
2008-11-27_17:14:55: ------------------------------------
I'm quite far off from understanding these sorts of errors.
Any ideas?
Thanks