Created
February 18, 2017 00:50
-
-
Save rafabarzotto/43a29515a4f6d62bfbfa733100f769c3 to your computer and use it in GitHub Desktop.
Script MySQL Bck bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOR /F "tokens=1-4 DELIMS=/ " %%F IN ('date /T') DO (set v_date=%%F%%G%%H) | |
FOR /F "tokens=1-4 DELIMS=: " %%F IN ('time /T') DO (set v_time=%%F%%G%%H) | |
set mysqldump="C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" | |
set homedir="C:\MySQLWinBackup\" | |
set fname=%v_date%_%v_time%.sql | |
echo %vdate% %v_time% - %fname% | |
cd %homedir% | |
%mysqldump% --add-drop-table --skip-lock-tables -h localhost --user=root --password=qwe123 oc > %homedir%oc_%fname% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment