Imagine your Mysql instance runs on a linux server, and every night all the files of the server are copied to a NFS volume with a cp command.
Is such a backup enough to also act as a mysql backup?
(Find all correct answers)
a) No, without synchronization with the database, the copied files will all be from a different point in time b) Yes, if really all files copied, than the cp is just fine c) No, as the database needs mechanisms like log-buffers and log-files, a file backup will result in something, which cannot be restored d) Yes, a file backup is fine, as backups aren't needed anyway
[ Data Backup and Recovery Methods (15%) - Introduction ]
a c
An operating system level backup is usually not enough in order to serve as a db-backup.
One exception is, if the database is shut down at the time of the backup.
Normally, a consistent backup needs some special handling in the database, for example doing a “flush tables with read lock;” before copying the files and a “unlock tables;” afterwards.
I’ve seen many companies that only had an OS level backup. And with Mysql, unlike virtually all other databases, even such a backup can be of help, if you only have MyIsam tables: You can restore those files from the backup and try a “repair table” – you’ll be able to get data back, even tho all tables will be from a different point in time.