0
I would like to do a Dump in my Mysql database, but I need this Dump to create the.sql file with the date Dump was made, so that I have saved all previous backups by date.
0
I would like to do a Dump in my Mysql database, but I need this Dump to create the.sql file with the date Dump was made, so that I have saved all previous backups by date.
1
Just create a shell script to back up for you.
https://gist.github.com/juniorb2ss/3661141de3a0dbbeaa5b30c34d0062a7
Basically to get date just use: /bin/date +%d-%m-%Y
Rest just run the dump and save the file.
Browser other questions tagged mysql backup dump
You are not signed in. Login or sign up in order to post.
but there would be no way to change the own line of the dump in mysql to create the file . sql with the correct date ? For example, I use the dump code and the . sql file created already comes with its name being ( 26/04/2016) ?
– Rafael Xavier Suarez
Just put it in the file name
$(date +%Y-%m-%d-%H.%M.%S).sql
at the command line.– juniorb2ss