PDA

View Full Version : Crontab and MySQL backup


petesmc
01-16-2001, 01:39 PM
How would i do a database dump for a MySQL databse using crontab every midnight?

0 0 * * * ???

JohnM
01-16-2001, 02:23 PM
I use:

0 0 * * * mysqldump --opt --user=[HR username]_[mysql account] --password=[password] [database name] > /path/to/file.sql

DarkWizard
01-17-2001, 05:56 PM
JohnM....may I use this in the "How Do I?" forum?

petesmc
01-17-2001, 05:59 PM
Even though i didn't write this, i click your profile because i was going to ask you to put this into the How do I forum.


I clicked your pofile to email you and saw this was your last thread so i clicked on it and ...

You had already suggested it...