Best way to back up mysql database
Matthew Seaman
m.seaman at infracaninophile.co.uk
Thu Oct 2 08:22:27 UTC 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Sebastian Tymków wrote:
| Hello,
|
| You can store whole db files too. It's faster to run database from scratch
| than use mysqldump and mysql "source".
Um... no. In general you cannot do this, and it is exceedingly irresponsible to
suggest such a thing. The *only* way this would ever be workable is if you shut
down MySQL completely while your backup process was running. For anything other
than a pissant little hobbyist DB that does no real work, that idea is just going
to be a non-starter.
If MySQL is running, then there is no guarantee that the contents of any disk
file has been properly synched with the in-memory working copy of the data.
Basically what you'ld be copying off the disk drive will be full of
inconsistencies and hence useless as a backup. This is why programs like
mysqldump(1) exist.
Cheers,
Matthew
- --
Dr Matthew J Seaman MA, D.Phil. Flat 3
~ 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
~ Kent, CT11 9PW, UK
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREDAAYFAkjkhLYACgkQ3jDkPpsZ+VYlrQCgs+tBSJfxa8cKHF+oYsu5Cai2
qZEAoJ6lZupzjapi9ugrE20Jp6Ol1xxj
=PMs9
-----END PGP SIGNATURE-----
More information about the freebsd-questions
mailing list