From here, the complete command for a hot backup of a MySQL database using only InnoDB tables is:
mysqldump -u user -ppass --single-transaction --routines --triggers --all-databases > backup_db.sql
Note the gap between -u and user and the lack of a gap between -p and pass. This is correct - a quirk of MySQL which has caught me on more than one occasion.
This MySQL page also has a very clear and concise explanation of the difference between physical and logical backups.
Physical backups (also called raw):
Physical backups consist of raw copies of the directories and files
that store database contents. This type of backup is suitable for
large, important databases that need to be recovered quickly when
This either involves shutting down the database or doing some sort of locking in order to prevent the database from changing during the process, and then taking a copy of the bits on disk.
Any updates are impossible during the process, unlike checkpointing (see below) where the database is "suspended" at a given point and then updates may proceed from that point while the backup is taken at the checkpoint.
The physical files (bits on disk) that make up the database are the ones that get backed up in a physical backup.
Read the page for more detail.
Logical backup methods have these characteristics:
• The backup is done by querying the MySQL server to obtain database
structure and content information.
What this basically means is that instead of being a binary bit for bit copy of the database at a given instant, this form of copy is a file consisting of the SQL that would be required to be run in order to reconstitute the database. Check out the contents of a mysqldump file (which is plain text, readable in any editor or using more/cat - what have you).
Hot v. Cold, or as the MySQL page calls them, Online v. Offline.
Hot - online - means that the server continues operating, Cold - offline - means that the database is not available for processing queries. With a hot backup however, there is a performance penalty to pay and that is why they are normally scheduled for off-peak times.
Again, I refer to the MySQL manual page for more detail (this page is one of the best written, clear and concise pieces of technical writing that I have come across in a long time).
You can read further there about Full v. Incremental backups and Snapshots. Come back here if you have further questions about these.
If you require a recommendation, I would recommend Percona's XtraBackup. It is a genuine hot backup solution for MySQL databases which use InnoDB tables - it does not work for the other engines, in particular MyIsam. The MyIsam architecture precludes hot backups - it requires locking of the database.
Finally, you might like to browse this post (author yours truly :-) ) which provides more detail on non-MySQL solutions to server backups.