[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] duply abort from pre script
From: |
Tom Ekberg |
Subject: |
Re: [Duplicity-talk] duply abort from pre script |
Date: |
Thu, 15 Dec 2016 07:49:38 -0800 (PST) |
User-agent: |
Web Alpine 2.01 (LRH 1302 2010-07-20) |
Edgar,
Thanks for the useful answer. I was able to do this command:
$ duply db_backup pre+bkp
which works fine. If step pre exits with a non-zero status then the bkp step
isn't run.
Tom Ekberg
Senior Computer Specialist, Lab Medicine
University of Washington Medical Center
1959 NE Pacific St, MS 357110
Seattle WA 98195
work: (206) 598-8544
email: address@hidden
-----
Date: Tue, 13 Dec 2016 21:41:59 +0100
From: address@hidden
To: Discussion about duplicity backup <address@hidden>
Subject: Re: [Duplicity-talk] duply abort from pre script
Message-ID: <address@hidden>
Content-Type: text/plain; charset=windows-1252
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