[useful] MySQL datbase backup script
Here is a script i use for backing my website up. Its a simple shell scipt that runs the mysql dump command.
so a typical usage of this might be:
mysqldump -uroot -pajellydoghnut
Where root is the username, ajellydoughnut is
the password and database1 is the database i
want to backup.
The advantage to doing it this way is that i can
go ahead and add this script as a cron joob to be
executed say every Tuesday at 11am meaning
that my database is backed up automatically for
me and a backup of that database is downloaded
to wherever this script is stored in .sql format
(typically i put it in a folder of its own in my
Another handy thing is that because
of >$(date).sql on the end the script automatically
sets the current date and time as the filename
meaning no more messing around looking
through the creation time, its just there in the
Hope this helps someone.