12 Nov

Scheduled Backup MySQL Administrator & Windows Scheduler – Odd

Creating scheduled backup using administrator is an easy task.

Follow the GUI and you’re done. But I observed something different!

MySQL Version: 5.0.83 Community

MySQL Administrator: 1.2.17

Machine: Intel P4, Windows XP, Enough RAM :)

Logs: General, Error & irrelevant here though Slow query.

Prologue: Administrator performs scheduled backup properly in normal scenario.

What I was watching: Administrator’s Auto-Backup behaviour with windows Scheduler service and tracing steps out.

Some facts:

MySQL Administrator stores backup project’s details in <PROJECT-NAME>.mbd files in xml format under directory

C:\Documents and Settings\<USER-NAME>\Application Data\MySQL

Along with it it also adds a scheduled task with name <PROJECT-NAME>.

“C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLAdministrator.exe” “-UDC:\Documents and Settings\<USER-NAME>\Application Data\MySQL\” “-cbkupconn” “-bp1″ “-btC:\” “-bx1″

If you find trouble getting automated backup work, make sure your Scheduler [Task Scheduler] service is running.

Start >> Run >> services.msc

MySQL Administrator does not log these events unless specified explicitly.

To enable logging:

Menu: Tools >> Options
Category: Administrator
In Backup Section:
  • Tick checkbox “Write log file for scheduled backup” and spcify path.
  • Tick checkbox “Log Row Processing Progress” and specify number.

To view Scheduled task’s log you may:

Start  >>  program  >>  accessasory  >>  System Tools  >>  Scheduled Tasks
Click on menu: Advance >> View Logs
Or
Open Windows/SchedLgU.Txt

My observation:

Whenever I keep task scheduler Enabled & Started, I could see updates in logs of Scheduled task and also in Event Viewer. For backups you get logged in General Query Logs.

But with my surprise I’m not able to get the MySQL Administrator’s log file (with default setting).

Also if scheduler is Disabled & Stopped, Nothing is getting logged. Neigher in logs of Scheduled task nor in Event Viewer.

And again there is no MySQL Administrator’s log file getting generated. Also this even is not getting logged in to Error Log!

Later I read the bug: http://bugs.mysql.com/bug.php?id=28821

I tried to change the path from default, C:\ to D:\SOMEDIRECTORY. And with my surprise MySQL Administrator logged successfully executed scheduled tasks to log.

Next observation after disabling Scheduler(Task Scheduler) Windows Service I made was, backup had failed but Administrator haven’t logged it into C:\MySQLAdminBackupLog.txt !!

Even now I have “Log file path” as D:\ and I’m reading log updates in C:\MySQLAdminBackupLog.txt. There is nothing in D:\!

Is it the problem with way Administrator writes to .mdb file (bug?) or am I doing something wrong!


5 thoughts on “Scheduled Backup MySQL Administrator & Windows Scheduler – Odd

  1. Thanks, this helped me find the setting for writing backup log files.

    Do you know if it possible to generate an auto email, when the backup has fnished to detemine if failed or success?

    thanks

  2. I tried to setup an Automated backup schedule using the MySQL GUI Tools under Windows 7. Whatever I do, it doesn’t show the task in Task Scheduler and the backup is not executed as intended

  3. i scheduled backup in MySQL Administrator but the backup never runs on scheduled time. When i check in Windows Task scheduler – it shows me ‘ Status- Could not start ‘

    And when i try to do backup manually by clicking “Execute Backup now” it works fine.

    Please help !!!!!!!

    • Hi Vinay,

      Sorry for the delayed response.
      I’m sure you must have solved your issue till now; and if interested I’d like you to share it too.
      Definitly documentation is the best way to follow a software and logs are best way to debug :)

      Thanks & keep visiting,
      Kedar.

Leave a Reply

-- Kedar Vaijanapurkar --