Protecting the data that cannot be regenerated.
WHAT MAKES DATABASE BACKUPS DIFFERENT
Code can be redeployed from the repository. Data cannot be recreated.
A file-level copy of a running database can be inconsistent. Always dump rather than copying the data directory.
HOW OFTEN
Daily at minimum. More often for transactional systems where a day of lost orders matters.
AUTOMATING IT
A cron job running mysqldump, compressing the output, and transferring it off the server.
Include a retention policy that removes old files, or the backups themselves fill the disk.
WHERE TO STORE
Off the server. A dump sitting in your home directory is lost in the same event that loses the database.
VERIFYING
Check the file size is plausible. A dump of a few kilobytes where you expect megabytes means it failed.
Periodically restore one into a test database and confirm it is complete.
BEFORE ANY MIGRATION OR DEPLOYMENT
Take one. It costs seconds and is the difference between an inconvenience and a disaster.