I am running
duplicity 0.6.18
on Mac OS X 10.7.5
I have seen bug
open, but there is no information on workaround.
I tried running the job as a root. I tried running job as myself (root scheduled as my user) and I had the same error in both cases.
However, if I run exactly the same job as myself in sudo -E mode it works.
I tried passing HOME, LOGNAME, USER environment variables, but in the end I always get the same error message.
Running as me from launchd
==Fri Feb 15 04:09:59 PST 2013==
ulimit -n 1024;\
Import of duplicity.backends.giobackend Failed: No module named gio
Reading filelist support/Home Share -ex.txt
Sorting filelist support/Home Share -ex.txt
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
No signatures found, switching to full backup.
Cleanup of temporary directory /tmp/duplicity/duplicity-J23qn5-tempdir failed - this is probably a bug.
Error Stream
close failed in file object destructor:
IOError: [Errno 32] Broken pipe
make: *** [_backup] Error 30
Traceback (most recent call last):
File "/usr/local/bin/duplicity", line 1391, in <module>
with_tempdir(main)
File "/usr/local/bin/duplicity", line 1384, in with_tempdir
fn()
File "/usr/local/bin/duplicity", line 1359, in main
full_backup(col_stats)
File "/usr/local/bin/duplicity", line 500, in full_backup
globals.backend)
File "/usr/local/bin/duplicity", line 378, in write_multivol
globals.gpg_profile, globals.volsize)
File "/Library/Python/2.7/site-packages/duplicity/gpg.py", line 316, in GPGWriteFile
bytes_to_go = data_size - get_current_size()
File "/Library/Python/2.7/site-packages/duplicity/gpg.py", line 308, in get_current_size
return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: '/tmp/duplicity/duplicity-J23qn5-tempdir/mktemp-AP2Ymu-2'
make: *** [_backup] Error 30
Running as Root from launchd
When I try to run as root I get the following error unless I copy my ~/.ssh/ to /var/root/. Setting $HOME environment variable to point to /Users/MyUser does not have any effect:
BackendException: ssh connection to myHost:#### failed: Server '[myHost]:####' not found in known_hosts
It is not really clear to me how backend chooses to find $HOME directory. If duplicity printed values of environment variables I could be certain I pass values properly. I did extensive testing on passing vars from make to shell, so I am sure I export variables right.
Running as me with sudo -E from command line
Here is the same command passing in sudo environment:
==Fri Feb 15 05:05:26 PST 2013==
ulimit -n 1024;\
Password: <-- sudo prompt
Import of duplicity.backends.giobackend Failed: No module named gio
Reading filelist support/Home Share -ex.txt
Sorting filelist support/Home Share -ex.txt
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
No signatures found, switching to full backup.
--------------[ Backup Statistics ]--------------
StartTime 1360933530.40 (Fri Feb 15 05:05:30 2013)
EndTime 1360933870.61 (Fri Feb 15 05:11:10 2013)
ElapsedTime 340.21 (5 minutes 40.21 seconds)
SourceFiles 258
SourceFileSize 604074079 (576 MB)
NewFiles 258
NewFileSize 604074079 (576 MB)
DeletedFiles 0
ChangedFiles 0
ChangedFileSize 0 (0 bytes)
ChangedDeltaSize 0 (0 bytes)
DeltaEntries 258
RawDeltaSize 604063267 (576 MB)
TotalDestinationSizeChange 594175687 (567 MB)
Errors 0
-------------------------------------------------