duplicity-team team mailing list archive
-
duplicity-team team
-
Mailing list archive
-
Message #01670
Re: [Question #228587]: Get the exit status of duplicity
Question #228587 on Duplicity changed:
https://answers.launchpad.net/duplicity/+question/228587
Status: Open => Answered
edso proposed the following answer:
On 10.05.2013 14:06, Henrik wrote:
> New question #228587 on Duplicity:
> https://answers.launchpad.net/duplicity/+question/228587
>
> I'm writing a shell script to handle the backup of one of our servers. I'm creating an error_handler that I want to call when a duplicity call fails or crashes, but I'm unable to find this out by checking the exit status of a duplicity run since it always seems to return 0. If it succeeds, if it fails because of incorrect params, if it crashes / throws an exception during execution, it always returns 0.
>
> The way I'm currently trying to check this is by doing,
>
> duplicity --force /root $REMOTE/$REMOTEBASEDIR/root
> if [ $? != 0 ]; then
> ..
>
> $? is always 0. How can I see if it has failed/crashed?
>
what's your duplicity version?
can you give an example with console output where duplicity fails with a
success exit code (0) ?
..ede/duply.net
--
You received this question notification because you are a member of
duplicity-team, which is an answer contact for Duplicity.