dimitrifrom31 Posted April 2, 2009 Share Posted April 2, 2009 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 More sharing options...
Todd Holley Posted April 2, 2009 Share Posted April 2, 2009 Execute a php file with the php mail function from the .bat? Not sure if that would work... Link to comment Share on other sites More sharing options...
dimitrifrom31 Posted April 2, 2009 Author Share Posted April 2, 2009 hmm actually it should work, i ll try to write this php script Link to comment Share on other sites More sharing options...
jcroom Posted April 2, 2009 Share Posted April 2, 2009 You could use php, and just use $_GET variables in the url. either use iexplore or php to execute the php script... edit: there are probably much easier ways to do this. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.