Skip to content

Instantly share code, notes, and snippets.

@TheYkk
Created November 15, 2018 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheYkk/bbca09c77ab30fee5e5eb93c2bbcc7f3 to your computer and use it in GitHub Desktop.
Save TheYkk/bbca09c77ab30fee5e5eb93c2bbcc7f3 to your computer and use it in GitHub Desktop.
Windows mysql backup
FOR /f %%a IN ('WMIC OS GET LocalDateTime ^| FIND "."') DO SET DTS=%%a
SET date=%DTS:~0,8%-%DTS:~8,6%
C:\xampp\mysql\bin\mysqldump.exe dataBaseAdi -h localhost -u admin -padmin > D:\yedeklerim\db1-%date%.sql
## 25 günü gecen backupları siler.
forfiles /p "C:\Yedeklerim" /s /m *.* /c "cmd /c Del @path" /d -25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment