Last active
August 29, 2015 14:21
-
-
Save folmert/b1ae1b12d1c748fde699 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
cd C:\LOCALHOST\SQL_BACKUP | |
@echo off | |
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) | |
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a-%%b) | |
mysqldump -u root --all-databases > %mydate%.sql | |
7z a -tzip %mydate%_%mytime%.zip %mydate%.sql | |
del %mydate%.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment