fbpx
Home » Blog » Scheduling MySQL Backups on Windows 7

Scheduling MySQL Backups on Windows 7

Many people have had problems scheduling database backups using the MySQL Administrator tool.

We too ran into this problem a while back and here’s how we fixed it.

The Problem

Developing CMS’s for clients ultimately means that most of the data is stored within a database and that needs to be backed up regularly along with other source files.

We fired up the MySQL Administrator too (v1.1.9), created backup projects for our databases then scheduled them daily.

However, when we checked the next day there were no backup files and a pile of errors in the Windows Application event log (we use Windows 7 64-bit).

The Solution

After a lengthy search on the MySQL website and other references, we tracked the problem down to a bad command line switch that the MySQL Administrator inserts into the Windows scheduled task.

The bad command line was:

“X:MySQLMySQL Administrator 1.1MySQLAdministrator.exe” “-UDC:UsersXXXAppDataRoamingMySQL” “-c” “-bpProjectXXX” “-btX:projectsXXXsql” “-bxprojXXX-“

The “-c” command line switch seems to be in lower-case.  It should be in UPPER CASE.

Going into Windows Task Scheduler and manually changing the “-c” to uppercase “-C” worked perfectly and now all our scheduled MySQL databases are backed-up just fine.

The good command line is now:

“X:MySQLMySQL Administrator 1.1MySQLAdministrator.exe” “-UDC:UsersXXXAppDataRoamingMySQL” “-C” “-bpProjectXXX” “-btX:projectsXXXsql” “-bxprojXXX-“

We hope this saves you a lot of time and effort.

Keep In Touch

Wil

Wil is a dad, consultant, developer, conference organiser, speaker and business mentor. He co-organizes the WordPress Sydney meetup group and has been on the orgnising committee for WordCamp Sydney since 2014. He speaks at many technical events and contributes to the WordPress open source project. His likes are chillies, craft beer and electrogravitics.
If You Enjoyed This Post
Join Our Newsletter
Give it a try, you can unsubscribe anytime.
Close