duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] Output streams


From: edgar . soldin
Subject: Re: [Duplicity-talk] Output streams
Date: Wed, 11 May 2011 21:08:39 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

On 11.05.2011 20:29, Yves Goergen wrote:
> Hi,
> 
> I'm running the backup of my server automatedly with duplicity. All
> output is recorded into a temp file and only if it doesn't look as
> expected, an e-mail will be sent through cron. In the case of success,
> no output must be generated so that cron will remain silent.
> 
> Therefore, the duplicity call redirects stdout to a file, and stderr to
> &1 so that it all goes into the file. This works most of the time, but
> any errors printed out by ncftpls will still be printed so far that cron
> catches it and sends me an e-mail with only those ncftp error messages.
> Everything else (and only that) goes into my log file.
> 
> What's wrong here? If I call
> 
>    duplicity --some-args 2>&1 >>tmpfile
> 
> then how can it be that any output from a subprocess of duplicity may
> not be caught in tmpfile? I see that the process is started with
> 
>    self.popen_persist(commandline)
> 
> but I don't know Python well enough to track this one down to either
> actual code or a definitive documentation of the function.
> 
> What more do I need to do to get *every* output into my log file and
> *none* to stdout?
> 
> OS: Ubuntu 10.4
> duplicity version 0.6.08b
> 

my guess, that is a simple shell issue.. try it the other way around

> duplicity --some-args  >>tmpfile 2>&1

order matters. first redirect stdout and then stderr to stdout. what you did 
reads redirect stderr to stdout (currently the terminal) and redirect stdout to 
the file. this way all of your stderr printouts should have landed in cron 
(terminal). i am not sure what duplicity actually prints to stderr at all 
though.

ede/duply.net




reply via email to

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