Improving MySQL database backup script
July 3, 2007 on 9:12 am | In MySQL |The original script is here
Reason: As usual, I checked the database backup file and found the size was really small. It meant the backup script had some problems. After then, I was told that the database’s root password had been changed. Oh, that was the culprit!
Now that I know what the problem is, how can I improve it?
The first thing comes to my mind is: I must add a flow controller statement which will tell me (by email) if the backup process is successful. But what if I read the email too late and the backup time is missed? Fortunately, the password is stored in a configuration file. Whenever the DB admin changes the password, she has to change the configuration file. So the better solution is: read the password from the configuration file instead of hard code in the script file.
No Comments yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^