mysql: backup

Database backup to one file:

mysqldump --master-data --single-transaction -u %username% -p -h %hostname% %database% > backup.sql

Database backup to directory as a separate tables:

mysqldump --master-data --single-transaction-u %username% --tab=%DirToBackup% %database%