duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] (no subject)


From: edgar . soldin
Subject: Re: [Duplicity-talk] (no subject)
Date: Sat, 16 Feb 2013 12:32:03 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

On 15.02.2013 14:38, Sergei Gnezdov wrote:
> I am running
> duplicity 0.6.18
> on Mac OS X 10.7.5
> 
> I have seen bug
> http://lists.nongnu.org/archive/html/duplicity-talk/2012-01/msg00047.html
> 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;\
>  /usr/local/bin/duplicity --tempdir /tmp/duplicity/   --exclude-filelist 
> "support/Home Share -ex.txt" "/Users/Shared/Home Share" 
> sftp://address@hidden:####/backup/Home\ 
> <sftp://address@hidden:2418/backup/Home/> Share 
> 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;\
> sudo -E /usr/local/bin/duplicity   --exclude-filelist "support/Home Share 
> -ex.txt" "/Users/Shared/Home Share" sftp://address@hidden:####/backup/Home\ 
> <sftp://address@hidden/backup/Home%5C> Share 
> 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
> -------------------------------------------------
> 


Sergei,

i am confused... what is your issue here? 
A. the mailing list cleanup problem
B. the ssh known_hosts issue
C. both?

_wrt. to known_hosts_. ssh connections are verified against a file (citing ssh 
manpage)
"additionally it can verify the client's host key
  (see $HOME/.ssh/known_hosts and /etc/ssh_known_hosts in the FILES section),"

so having the servers public key in there will identify the server on 
reconnections and warn you if it changes at some point.

sudo -E _keeps_ the current $HOME environment variable. so if you run it as 
/user/ it will keep (probably HOME=/home/user) which is not what you want to do.
you want it to reset the environment momentarily to root's so HOME will contain 
root's HOME (probably /root) so duplicity/ssh can find and add it there.

you do not have to use duplicity btw. to add the key to your known_hosts 
database. you can as well utilize ssh for a first connection to your server. it 
will prompt you and after adding you can simply exit the program. no need to 
enter password or establish the connection alltogether.

this reminds me.. with 0.6.18 you will *have to* do so. there is a fix in 
0.6.19 that'll prompt you if you want to add. 0.6.18- will simply inform and 
fail in this case.

so
 run ssh to connect once as root and it'll be fine
or
 upgrade to latest duplicity 0.6.21 and run it once with plain 'sudo'


..ede/duply.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]