Advertisement
iLogann

backup

Aug 3rd, 2014
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. @REM *** PARAMETERS/VARIABLES ***
  2. SET BackupDir="C:\Users\root\Desktop\DayZ\DBBACKUPS\OverpochNapf"
  3. SET mysqldir="C:\xampp\mysql\bin"
  4. SET mysqlschema=xxxxxx
  5. SET mysqlpassword=xxxxxx
  6. SET mysqluser=xxxxxx
  7. SET housekeepafter=5
  8. SET datestamp=%date:~-10,2%-%date:~-7,2%-%date:~-4,4%_%time:~0,2%.%time:~3,2%.%time:~6,2%
  9. @REM *** EXECUTION ***
  10. @REM Change to mysqldir
  11. c:
  12. cd %mysqldir%
  13.  
  14. @REM dump/backup ALL database, this is all in one line
  15. mysqldump -u %mysqluser% -p%mysqlpassword% --databases %mysqlschema% >%BackupDir%\%mysqlschema%_backup.%datestamp%.sql
  16.  
  17. @REM - Housekeeping
  18. forfiles -p %BackupDir% -s -m *.sql -d -%housekeepafter% -c "cmd /c del @path"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement