views:

2162

answers:

5

I was wondering what is the best free MySQL backup solution on a windows server? I am interested in backing up the data only.

Constraints

  • free solution
  • backup should be done to somewhere outside the server
  • windows only
  • mysql only
  • if you provide a suggestion with batch files & co. please add source code.

thx.

+5  A: 

You can setup a small batch file to take the output of mysqldump and upload it on remote FTP server (or simply copy it on a UNC path). It's free, and easy to implement.

Edit: If by "List item" you mean that you want plain text files (not SQL statements), you can also use mysqldump to achieve that, using the --tab=path option. This will create a tab seperated list of your values in each table.

Here is an example of a batch script to copy a file via UNC:

@echo off

REM "Create a time signature for the backup"
SET backupTime="%date:~0,2%-%date:~3,2%-%date:~6,6%_%time:~0,2%-%time:~3,2%"

REM "Mount \\REMOTESERVER\MySQLBackup to drive X:"
net use X: \\REMOTESERVER\MySQLBackup

REM "Dump the database to the file."
mysqldump --user=backupuser --password=***** my_db > X:\%backupTime%.sql

REM "Unmount X:"
net use X: /DELETE
Andrew Moore
i was thinking of that but i need details .. code ;)
Michal
I just added a small batch file as an example.
Andrew Moore
+1  A: 

This works well: http://dev.mysql.com/downloads/gui-tools/5.0.html

The administrator tool in that package has a very easy to use backup utility.

Gothael
A: 

If you're already using PHP, you can use phpMyAdmin and it'll dump your entire database into a file or display it on screen for copying and pasting. Just click the database you want and then click the Export link and it'll bring up the easy to use interface. Thats how I've always done it. phpMyAdmin isn't terribly hard to configure.

IAmCodeMonkey
A: 

Here is a nice MySQL Backup solution for windows, completely free. This one has a nice feature which allows end user to generate batch file to automate MySQL backup process.

MySQL backup solution for Microsoft Windows

A: 

If you need something with a schedule try zmanda