Does mysqldump return error codes I can use on a Windows batch file with such code: if errorlevel 1 and so on?
I would like to verify the success or failure of a backup.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Mysqldump returns the following:
http://dev.mysql.com/doc/refman/5.5/en/error-types.html
So you should probably use
if errorlevel 2to ignore warnings and only handle errors (depending on your needs and what warnings might occur, of course). Something like this might work: