mysqldump for logical backups; Percona XtraBackup for large physical hot backups on busy primaries.
mysqldump
# Shell:
mysqldump -u root -p --single-transaction practice > practice.sql
# Restore:
mysql -u root -p practice < practice.sqlPractice: Run read-only EXPLAIN on practice tables where possible.
--single-transaction
InnoDB consistent snapshot without locking all tables—use for OLTP dumps.
Test restores
Schedule restore drills—untested backups are not disaster recovery.
Important interview questions and answers
- Q: Logical vs physical backup?
A: mysqldump is SQL logical; XtraBackup copies files hot. - Q: WHERE during restore?
A: Restore to new instance before swapping DNS.
Self-check
- Why --single-transaction?
- Why test restore?
Tip: mysqldump --single-transaction for InnoDB consistency.
Interview prep
- single-transaction?
Consistent InnoDB dump without global read lock.
- Restore test?
Proves backup integrity and RTO.