duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] duply abort from pre script


From: edgar . soldin
Subject: Re: [Duplicity-talk] duply abort from pre script
Date: Tue, 13 Dec 2016 21:41:59 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

On 13.12.2016 21:26, Nate Eldredge via Duplicity-talk wrote:
> On Tue, 13 Dec 2016, Tom Ekberg via Duplicity-talk wrote:
> 
>> I would like to run duply and have a 'pre' script do an exit with a non-zero 
>> status to have a backup terminate. I have done several googles and looked at 
>> the code. Do you happen to know if the exit status of a 'pre' script is 
>> checked prior to running a backup?
> 
> From the code at http://duply.net/wiki/index.php/duply-code it seems pretty 
> clear that the backup continues regardless of the exit status.  At line 1105 
> you can see that a nonzero exit status causes an error message, but execution 
> continues.  And at line 2229 you can see that the whole thing takes place in 
> a subshell anyway, and the parent continues regardless of what the child does.
> 
> It would be pretty easy to patch it to change this behavior if you want.
> 

actually it should work as described in the manpage
  http://duply.net/wiki/index.php/Duply-documentation

"
SEPARATORS:
  _ (underscore)  
             neutral separator
  + (plus sign), _and_  
             conditional AND
             the next command will only be executed if the previous succeeded
  - (minus sign), _or_  
             conditional OR
             the next command will only be executed if the previous failed

   example:  
    'pre+bkp-verify_post' translates to 'pre_and_bkp_or_verify_post'
"

if not it's a bug and should be fixed. ..ede/duply.net



reply via email to

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