I am looking for a PHP script that will be used to auto backup a MySQL database.

Regards,

Maru

    Is there a PHP script I can use to do the mysqldump - I would like say every night at 8:00 PM (i.e. the mysqldump to be done automatically every night say at 8:00 PM).

    Thank you.

    Maru

      now were talking apples and oranges. you don't need PHP to do any of this. mySQL comes with mysqldump for backing up. if you want to execute mysqldump at a certain time interval (and you are using linux/unix) then use cron. an example crontab might look like this:

      0 20 * * * /usr/local/bin/mysqldump --user=xxx --password=xxx database >/path/to/backup.sql 2>/path/to/errors.err
      

      if you use windows then there is probably a way to do the same thing with the Windows Task Scheduler

        I am using Windows 2000 Server.

          Thank you very much for all your help.

          Maru

            Write a Reply...