I don't mean to step on @RudyVisser's answers in comments, but here's another solution:
$syntax = 'innobackupex --user="'.$mysql_user.'" --password="'.$mysql_pass.'"
--databases="'.$mysql_db.'" --stream=tar ./ | gzip -c -1
> /var/bak/2013-08-09-1431_mysql.tar.gz ; echo $?')
$exit_status = shell_exec($syntax);
The echo inside the command should report the exit status of innobackupex, which is 0 if the backup was successful, and non-zero if there was an error.
http://www.percona.com/doc/percona-xtrabackup/2.1/xtrabackup_bin/xtrabackup_exit_codes.html
PS: Percona XtraBackup also has a --compress
option that uses the qpress algorithm, known to be very fast. I mention this because I notice you're using gzip -1
presumably for better performance.