MySQL backup/restore from command line

backup:
# mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

restore:
# mysql -u root -p[root_password] [database_name] < dumpfilename.sql