Skip to content

Instantly share code, notes, and snippets.

@stucka
Last active December 29, 2017 21:29
Show Gist options
  • Save stucka/e1fb9fc92ef7048cbb2de464646a4596 to your computer and use it in GitHub Desktop.
Save stucka/e1fb9fc92ef7048cbb2de464646a4596 to your computer and use it in GitHub Desktop.
MySQL backup script with file naming
set datestr=%date:~10,4%-%date:~4,2%-%date:~7,2%
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqldump" --add-drop-database --all-databases --user=root -p >d:\mysqldump-stucka%datestr%.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment