General information
Category:
Coding, syntax & commands
Title:
Mysql backup using date as file name
Environment versions
Network:
Windows 2008 Server
Hi all
I want to backup mysql and using date as backup file name
I wrote a bat file.....
echo Date format = %date%
echo mm= %date:~0,2%
echo dd= %date:~3,2%
echo yyyy = %date:~6,4%
echo.
echo datestamp = %date:~6,4%-%date:~0,2%-%date:~3,2%
mysqldump -umyuser -pmypassword mydatabase > "backup-%datestamp%.sql"
but the output file name is just "backup-.sql" only
how to make the file name something like "backup-2013-08-02.sql"
Thanks !
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only