We have 3 MySQL databases in a production environment on one Windows 2008 server. How do others schedule backups and how would you restore an individual database. I see there is a Data Dump project option but don't see how I would schedule it to run nightly.
|
If its your own server in your office, you have many options. I assume you are using Wamp? If so in the folder of MySql is a folder called Data. In it are all your databases. I have used many programs to copy the files from there. You just don't want to do it during a write. I hope this helps. |
|||||||||
|
|
Databases change faster then they can be copied and doing a file-level backup on a running MySQL database will result in a corrupt backup. you must either stop the database and preform a file-level backup or in most cases, backup the database to file using the program mysqldump.exe. |
|||||||
|
|
Create a .bat file with mysqldump.exe (within bin directory), here you can find the command syntax. |
|||
|
|
|
Just to elaborate on lg's answer, mysqldump is the best and safest way to do your backups. Create your batch file(s) and run it/them via Task Scheduler. If you ever get to the point where the backup process causes problems due to record or table locks (depending on the DB engine being used) it's time to set up master/slave replication. This can even be done by running multiple instances of MySQL on the same machine. The backups are then taken from the slave, which allows the master to run uninterrupted. |
|||
|
|