Re: MySQL GUI Tool - BACKUP using command line
If you have MySQLAdministrator, you can schedule it to run at whatever time you want.
If you want a bat file for command line then copy this to a file, and it will usemysqldump to dump your database. Adjust the file name and databases to back up to your own requirement.
Note that mysqldump files are NOT restorable with MySQLAdministrator.
~~~~~~~~~~~~~~~~~~
@echo off
for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
for /f "tokens=1" %%u in ('time /t') do set t=%%u
if "%t:~1,1%"==":" set t=0%t%
set datestr=%d:~6,4%%d:~3,2%%d:~0,2%
set timestr=%t:~0,2%%t:~3,2%
mysqldump -uroot -ppassword --result-file="d:/all_backup "%datestr%" "%timestr%".sql" --all-databases
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Or, you build a backup project with MySQL administrator, schedule it, then open your Scheduled tasks to see the commandline.
Copy/paste the commandline into your bat file.
Disable the scheduled task if you don't want it to run.
That backup WILL be restorable with MySQLAdministrator.
Good luck,
Barry.