I’ve got a script which launch this MySQL command :
mysqldump -u login -ppass --routines --triggers --databases db >> dump.sql
It’s working fine, but I want to check the result of the dump in case of an error.
For example, if the base is stopped or down, an error is displayed. How can I store the error code in a variable to check it (e.g. with an if statement) ?
Ok, found out !