The following are three script snippets to use for database backup procedures:
mysqldump
MySQL Dump Command
Tagged:
To back up a big MySQL server use the following on the command line:
mysqldump --all-databases --add-drop-table -c -u -p | bzip2 -c > .bak.sql.bz2
It will use mysqldump and it will compress the sql file. You will backup the entire server with this command.