How to Dump in Mysql for the file to contain the date?

Asked

Viewed 354 times

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 answer

1

  • 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) ?

  • 1

    Just put it in the file name $(date +%Y-%m-%d-%H.%M.%S).sql at the command line.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.