As an fyi from the 'info tar'...
"GNU tar' returns only a few exit statuses. I'm really aiming
simplicity in that area, for now. If you are not using the--compare'
(--diff',-d') option, zero means that everything went well, besides
maybe innocuous warnings. Nonzero means that something went wrong.
Right now, as of today, "nonzero" is almost always 2, except for remote
operations, where it may be 128."
I'm not sure what is meant by remote operations.
As for the error logs, on my system it is /var/log/httpd/error_log, and when playing around with your code, I got messages like this....
/bin/tar: /backup.tar: Cannot open: Permission denied
/bin/tar: Error is not recoverable: exiting now
/bin/tar: /backup.tar: Cannot open: Permission denied
/bin/tar: Error is not recoverable: exiting now
/bin/tar: Removing leading /' from member names
/bin/tar: Removing leading/' from member names
/bin/tar: /backup.tar: Cannot open: Permission denied
/bin/tar: Error is not recoverable: exiting now
I'm not sure where to look other than that.
Have you tried a different command such as 'ls'?