Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: switch to the "data" folder
- pushd "%mysqlDataDir%"
- :: create backup folder if it doesn't exist
- if not exist %backupDir%%dirName% mkdir %backupDir%%dirName%
- :: iterate over the folder structure in the "data" folder to get the databases
- for /d %%f in (*) do (
- :: remove echo here if you like
- echo processing folder "%%f"
- %mysqldump% --host="localhost" --user=%dbUser% --password=%dbPassword% --port=%port% --single-transaction --add-drop-table --databases %%f > %backupDir%%dirName%%%f.sql
- %zip% a -tzip %backupDir%%dirName%%fileSuffix%_%%f . sql gz %backupDir%%dirName%%%f.sql`enter code here`
- del %backupDir%%dirName%%%f .sql
- )
- popd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement