← Back to team overview

duplicity-team team mailing list archive

[Question #228587]: Get the exit status of duplicity

 

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?

Thanks in advance!

-- 
You received this question notification because you are a member of
duplicity-team, which is an answer contact for Duplicity.