tags:

views:

29

answers:

1

Hi All

I have My SQL running on my remote webserver.

What is the best way to back this up every night to my windows home server?

Thanks

+1  A: 
  1. Create a mysql SQL script with the backup process most likely having mysqldump or SELECT .. INTO OUTIFLE commands.

  2. Create a .bat file to run the mysql script in step1 with command line. mysql -uuser -ppassword -host remoteserver.com database < script.sql

  3. Set up Windows jobs to execute the bat file daily.

Yada
i doubt that his remote mysql server is accessible via `mysql` from his windows box.
ax
Not sure what you mean. mysql command is used to access remote/local servers. Just need to specify the -host option. The default is to access the localhost.
Yada
@Yada in many hosting environments, access to mySQL from the outside is blocked, partly because of horrible security problems with the mySQL logins in the past. In that case, you need a "proxy" (e.g. a PHP script) to access the database. From an earlier question, though, we know that the OP has 2003 server fully under his control, so this solution is probably going to work.
Pekka
Thanks, so I install MYSQL on my home server and it will communicate with my remote MY SQL server?
Roaders
@Roaders yes, that's the idea. The mySQL client binaries would be enough (no need to install the server locally) but I don't think there's a client only installation.
Pekka