These two files are what I use to create regular backups on our websites. They create a sql dump of the database, and then a tarball of the directory structure.
This is all fine, but I want to find a way that a message will be sent to slack if one of the other commands (or the whole script) fails.
EG - tar
failed because filesystem run out of space; or mysqldump
failed because wrong password? or simply 'couldn't find folder!?, etc!