Guest User

Untitled

a guest
Jul 9th, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. @ECHO OFF
  2.  
  3. set TIMESTAMP=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%
  4.  
  5. REM Export all databases into file e:\backup\databases.[year][month][day].sql
  6. "C:\program files\mysql\mysql server 5.6\bin\mysqldump.exe" lithandb result-file="e:\backup\databases.%TIMESTAMP%.sql" --user=root --password=test123
  7.  
  8. REM Change working directory to the location of the DB dump file.
  9. C:
  10. CD e:\backup\
  11.  
  12. REM Compress DB dump file into CAB file (use "EXPAND file.cab" to decompress).
  13. MAKECAB "databases.%TIMESTAMP%.sql" "databases.%TIMESTAMP%.sql.cab"
  14.  
  15. REM Delete uncompressed DB dump file.
  16. DEL /q /f "databases.%TIMESTAMP%.sql"
Add Comment
Please, Sign In to add comment