I have this code for how to do mysql bat file for backup, this is the code.
@echo off
echo Starting Backup of Mysql Database on server
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set dt=%%c-%%a-%%b)
For /f "tokens=1-4 delims=:." %%a in ('echo %time%') do (set tm=%%a%%b%%c%%d)
set bkupfilename=%1 %dt% %tm%.sql
echo Backing up to file: %bkupfilename%
mysqldump -p 3306 -h 192.168.0.1 -u root -p 123456
bayanat>C:\mysql_daily_backups\"bayanat%bkupfilename%"
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire