Jump to content

Automated backup of MySQL Database?


dmccabe

Recommended Posts

I am running a wordpress installation on an internal web server as I am going to use it as a backend for our intranet.

 

It is running through IIS on a  Windows 2000 server.

 

Can anyone tell me how I would go about creating an automated backup of the mysql database ?

 

Edit: - If my database is called "wp" do I simply need to backup the \\lch-web1\c$\MySQL\data\wp directory on the server?

Link to comment
https://forums.phpfreaks.com/topic/95772-automated-backup-of-mysql-database/
Share on other sites

Edit: - If my database is called "wp" do I simply need to backup the \\lch-web1\c$\MySQL\data\wp directory on the server?

 

I wouldn't do that. Use an sql dump instead. Here is a batch file I just wrote that is based off of a tutorial by phpfreak

sql_backup.bat

@echo off
call mysqldump --opt -c -e -Q -u %1 -p%2 %3 > %4

 

Usage:

  sql_backup mysql_user mysql_pass database_name output_file

 

To make it more automatic you could add a scheduled task that would run that script every x hours or whatever. This also assumes that you have C:\path\to\mysql\bin in your path.

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.