Simple MySQL Backup/Restore
To backup:
$ mysqldump -u username -p -h hostname databasename > filename
And restore:
$ cat filename | mysql -u username -p -h hostname databasename
To backup:
$ mysqldump -u username -p -h hostname databasename > filename
And restore:
$ cat filename | mysql -u username -p -h hostname databasename