Backup script for MySQL #!/bin/bash
#
# This script will run in a loop for every database on the server and
# create a backup file per db. DUMPOPTIONS currently works with MySQL 4.0.24
# change it if you are using a different version
#
# Customize the variables below to adjust this script for your environment
# This should also ...
mysqldump Needless to say you have to backup up MySQL database just like any other rdbms. The utility to backup a MySQL database is mysqldump.
mysqldump -u [username] -p [database_name] > /backup/db_name.sql
The above command will dump the contents of database into an ASCII file. To restore the database you can run ...