MySQL backup

-create a user (such as backup) with select and lock priviledges for all databases from any host
-set MySQL server configuration to listen on external ports
pw=mybackuppassword
hst=MySQLhost
nice mysqldump -h $hst -u backup -p$pw --compress --add-drop-table --extended-insert -A | gzip -9 >/backups/$hst-$(date +"%Y%m%d").gz