Backup:
/usr/bin/mysqldump --user=dbuser --password=dbpass --host=localhost --add-drop-table dbname > backups/mydbdump.sql

Restore:
(if the db exist)
# mysql -u root -p[root_password] [database_name] < dumpfilename.sql

mysql -u root -ps3cre3t

mysql> create database dbname;
Query OK, 1 row affected (0.02 sec)

# mysql -u root -ps3cre3t db < /tmp/mydbdump.sql

Private
No