There are only two remaining calls to exit (apart of those run on the remote host):
In the @check_lockfile@ function: it seems redundant to me, and this should quickly disappear now that backupninja itself has got locking support; I'm going to open a dedicated ticket about it; let's ignore it as far as the current ticket is concerned.
In the @rotate_long@ function, one may read:
if [ ! -d "$backuproot" ]; then
echo "Debug: skipping rotate of $backuproot as it doesn't exist."
exit
fi
It seems to me the @rotate_long@ function, called for every include, is not the correct place to exit and skip the whole rsync backup job entirely (that is, skip processing of other includes too), but I don't know this code well and only had a quick look.
Anyway, it seems to me that: either the debug message (skipping rotate of $backuproot as it doesn't exist) is correct, and the @exit@ should be turned into a mere @return@; or the debug message is incorrect, and this error condition is really worth exiting the whole rsync backup job, and then @exit@ should be turned into a @fatal@ (generally, I don't think we want to abort silently if backups cannot be done as configured).
In the @check_lockfile@ function: it seems redundant to me, and this should quickly disappear now that backupninja itself has got locking support; I'm going to open a dedicated ticket about it; let's ignore it as far as the current ticket is concerned.
Ok.
In the @rotate_long@ function, one may read:
[...]
It seems to me the @rotate_long@ function, called for every include, is not the correct place to exit and skip the whole rsync backup job entirely (that is, skip processing of other includes too), but I don't know this code well and only had a quick look.
You're right.
Anyway, it seems to me that: either the debug message (skipping rotate of $backuproot as it doesn't exist) is correct, and the @exit@ should be turned into a mere @return@; or the debug message is incorrect, and this error condition is really worth exiting the whole rsync backup job, and then @exit@ should be turned into a @fatal@ (generally, I don't think we want to abort silently if backups cannot be done as configured).
rhatto, did I miss something?
You didn't missed anything. You just found another @exit@ that should be changed by a @fatal@. So I commited two changes: