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