PHP vs Batch file for mysql cronjob?

Posted by mysqllearner on Server Fault See other posts from Server Fault or by mysqllearner
Published on 2010-01-15T03:07:38Z Indexed on 2010/04/11 2:03 UTC
Read the original article Hit count: 519

Filed under:
|
|
|
|

Hi,

My server details:

OS: Windows Server 2003
IIS6
Plesk 8.xx installed (currently using Plesk to set the cronjob)

I need your advice. I have 2 methods:

Method 1:

Using php + mysqldump, create databases backup files into gzip, and then send email with attachment (each databases has around about 25mb)

Method 2:

Using batch + mysqldump, create databases backup files into gzip, and then send email with attachment (same, each databases has around about 25mb)

My questions:

  1. Whats the difference of using php file and batch file for cronjob?

  2. Which method is better in term of backup speed and send email, and (maybe)safety (e.g., lesser file corrupt occurance)?

  3. If i set the cronjob hourly, will it effect my web performances? I mean, lets say my website has 100++ users online now, and each user making transaction to MySQL, when I perform backup at my web peak hour, will it decrease the performances, like the loading speed, prone to errors etc??

(sorry for my bad english)

P.S: If you need my php and batch file code, please ask me to post it here. I didnt post it now is because, its very simple and standard code.

© Server Fault or respective owner

Related posts about php

Related posts about batch