Jump to content

Scheduled mysql dump


Recommended Posts

Hi,

 

I just made a batch file to dump my tcadmin sql database but I would like it to be emailed on my email adress, this way if server got big issue i will be able to recover the file as it gona be on my own comp.

 

So far here is my .bat file contents :

 

"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqldump" -u[sqluser]-p[sqlpassword] --result-file="D:\backup_%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%_%time:~0,2%%time:~3,2%%time:~6,2%.sql" [databasename]

 

I used the task scheduled to run it everyday during night.

If you are interested you can just copy paste the code into a .txt file then rename it sqlbackup.bat and run the task scheduler to launch it when u want.

 

SO does any1 know how to send it via email with a batch command?

 

Thx

Link to comment
Share on other sites

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. Terms of Use